var Hw=Object.defineProperty;var tp=r=>{throw TypeError(r)};var qw=(r,t,s)=>t in r?Hw(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s;var Fe=(r,t,s)=>qw(r,typeof t!="symbol"?t+"":t,s),ju=(r,t,s)=>t.has(r)||tp("Cannot "+s);var C=(r,t,s)=>(ju(r,t,"read from private field"),s?s.call(r):t.get(r)),pe=(r,t,s)=>t.has(r)?tp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),ee=(r,t,s,o)=>(ju(r,t,"write to private field"),o?o.call(r,s):t.set(r,s),s),Pe=(r,t,s)=>(ju(r,t,"access private method"),s);var fa=(r,t,s,o)=>({set _(l){ee(r,t,l,s)},get _(){return C(r,t,o)}});function Qw(r,t){for(var s=0;so[l]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(l){if(l.ep)return;l.ep=!0;const u=s(l);fetch(l.href,u)}})();function Ic(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Mu={exports:{}},Po={},Uu={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var np;function Kw(){if(np)return Ce;np=1;var r=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function w(P,B,ce){this.props=P,this.context=B,this.refs=k,this.updater=ce||N}w.prototype.isReactComponent={},w.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,B,"setState")},w.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=w.prototype;function F(P,B,ce){this.props=P,this.context=B,this.refs=k,this.updater=ce||N}var A=F.prototype=new E;A.constructor=F,j(A,w.prototype),A.isPureReactComponent=!0;var L=Array.isArray,W=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function z(P,B,ce){var me,he={},X=null,ve=null;if(B!=null)for(me in B.ref!==void 0&&(ve=B.ref),B.key!==void 0&&(X=""+B.key),B)W.call(B,me)&&!G.hasOwnProperty(me)&&(he[me]=B[me]);var Re=arguments.length-2;if(Re===1)he.children=ce;else if(1>>1,B=K[P];if(0>>1;Pl(he,U))Xl(ve,he)?(K[P]=ve,K[X]=U,P=X):(K[P]=he,K[me]=U,P=me);else if(Xl(ve,U))K[P]=ve,K[X]=U,P=X;else break e}}return ae}function l(K,ae){var U=K.sortIndex-ae.sortIndex;return U!==0?U:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;r.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();r.unstable_now=function(){return d.now()-h}}var p=[],m=[],g=1,v=null,_=3,N=!1,j=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(m)}}function L(K){if(k=!1,A(K),!j)if(s(p)!==null)j=!0,Se(W);else{var ae=s(m);ae!==null&&ke(L,ae.startTime-K)}}function W(K,ae){j=!1,k&&(k=!1,E(z),z=-1),N=!0;var U=_;try{for(A(ae),v=s(p);v!==null&&(!(v.expirationTime>ae)||K&&!Ee());){var P=v.callback;if(typeof P=="function"){v.callback=null,_=v.priorityLevel;var B=P(v.expirationTime<=ae);ae=r.unstable_now(),typeof B=="function"?v.callback=B:v===s(p)&&o(p),A(ae)}else o(p);v=s(p)}if(v!==null)var ce=!0;else{var me=s(m);me!==null&&ke(L,me.startTime-ae),ce=!1}return ce}finally{v=null,_=U,N=!1}}var $=!1,G=null,z=-1,ie=5,ue=-1;function Ee(){return!(r.unstable_now()-ueK||125P?(K.sortIndex=U,t(m,K),s(p)===null&&K===s(m)&&(k?(E(z),z=-1):k=!0,ke(L,U-P))):(K.sortIndex=B,t(p,K),j||N||(j=!0,Se(W))),K},r.unstable_shouldYield=Ee,r.unstable_wrapCallback=function(K){var ae=_;return function(){var U=_;_=ae;try{return K.apply(this,arguments)}finally{_=U}}}})($u)),$u}var ap;function Jw(){return ap||(ap=1,zu.exports=Yw()),zu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var lp;function Zw(){if(lp)return Rt;lp=1;var r=jc(),t=Jw();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function _(e){return p.call(v,e)?!0:p.call(g,e)?!1:m.test(e)?v[e]=!0:(g[e]=!0,!1)}function N(e,n,i,a){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,n,i,a){if(n===null||typeof n>"u"||N(e,n,i,a))return!0;if(a)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function k(e,n,i,a,c,f,y){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=y}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){w[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];w[n]=new k(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){w[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){w[e]=new k(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){w[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){w[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){w[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){w[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){w[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function F(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(E,F);w[n]=new k(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,F);w[n]=new k(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,F);w[n]=new k(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){w[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),w.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){w[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function A(e,n,i,a){var c=w.hasOwnProperty(n)?w[n]:null;(c!==null?c.type!==0:a||!(2x||c[y]!==f[x]){var b=` `+c[y].replace(" at new "," at ");return e.displayName&&b.includes("")&&(b=b.replace("",e.displayName)),b}while(1<=y&&0<=x);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?B(e):""}function he(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function X(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case ie:return"Profiler";case z:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _e:return n=e.displayName||null,n!==null?n:X(e.type)||"Memo";case Se:n=e._payload,e=e._init;try{return X(e(n))}catch{}}return null}function ve(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(n);case 8:return n===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ge(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function et(e){var n=ge(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function jt(e){e._valueTracker||(e._valueTracker=et(e))}function ot(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),a="";return e&&(a=ge(e)?e.checked?"true":"false":e.value),e=a,e!==i?(n.setValue(e),!0):!1}function Gt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mt(e,n){var i=n.checked;return U({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Ut(e,n){var i=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;i=Re(n.value!=null?n.value:i),e._wrapperState={initialChecked:a,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function we(e,n){n=n.checked,n!=null&&A(e,"checked",n,!1)}function it(e,n){we(e,n);var i=Re(n.value),a=n.type;if(i!=null)a==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Yt(e,n.type,i):n.hasOwnProperty("defaultValue")&&Yt(e,n.type,Re(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Xt(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Yt(e,n,i){(n!=="number"||Gt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Dn=Array.isArray;function In(e,n,i,a){if(e=e.options,n){n={};for(var c=0;c"+n.valueOf().toString()+"",n=si.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Vs(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Hs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gg=["Webkit","ms","Moz","O"];Object.keys(Hs).forEach(function(e){Gg.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Hs[n]=Hs[e]})});function md(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||Hs.hasOwnProperty(e)&&Hs[e]?(""+n).trim():n+"px"}function yd(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var a=i.indexOf("--")===0,c=md(i,n[i],a);i==="float"&&(i="cssFloat"),a?e.setProperty(i,c):e[i]=c}}var Xg=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ga(e,n){if(n){if(Xg[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function Xa(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ya=null;function Ja(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Za=null,Zr=null,es=null;function gd(e){if(e=po(e)){if(typeof Za!="function")throw Error(s(280));var n=e.stateNode;n&&(n=Ri(n),Za(e.stateNode,e.type,n))}}function vd(e){Zr?es?es.push(e):es=[e]:Zr=e}function wd(){if(Zr){var e=Zr,n=es;if(es=Zr=null,gd(e),n)for(e=0;e>>=0,e===0?32:31-(av(e)/lv|0)|0}var ui=64,ci=4194304;function Gs(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function di(e,n){var i=e.pendingLanes;if(i===0)return 0;var a=0,c=e.suspendedLanes,f=e.pingedLanes,y=i&268435455;if(y!==0){var x=y&~c;x!==0?a=Gs(x):(f&=y,f!==0&&(a=Gs(f)))}else y=i&~c,y!==0?a=Gs(y):f!==0&&(a=Gs(f));if(a===0)return 0;if(n!==0&&n!==a&&(n&c)===0&&(c=a&-a,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((a&4)!==0&&(a|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0i;i++)n.push(e);return n}function Xs(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Jt(n),e[n]=i}function fv(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0=so),Qd=" ",Kd=!1;function Gd(e,n){switch(e){case"keyup":return Bv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rs=!1;function $v(e,n){switch(e){case"compositionend":return Xd(n);case"keypress":return n.which!==32?null:(Kd=!0,Qd);case"textInput":return e=n.data,e===Qd&&Kd?null:e;default:return null}}function Wv(e,n){if(rs)return e==="compositionend"||!gl&&Gd(e,n)?(e=zd(),yi=dl=zn=null,rs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:i,offset:n-e};e=a}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=rf(i)}}function of(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?of(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function af(){for(var e=window,n=Gt();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Gt(e.document)}return n}function xl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Jv(e){var n=af(),i=e.focusedElem,a=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&of(i.ownerDocument.documentElement,i)){if(a!==null&&xl(i)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(a.start,c);a=a.end===void 0?f:Math.min(a.end,c),!e.extend&&f>a&&(c=a,a=f,f=c),c=sf(i,f);var y=sf(i,a);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(y.node,y.offset)):(n.setEnd(y.node,y.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,ss=null,El=null,lo=null,Sl=!1;function lf(e,n,i){var a=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Sl||ss==null||ss!==Gt(a)||(a=ss,"selectionStart"in a&&xl(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),lo&&ao(lo,a)||(lo=a,a=ki(El,"onSelect"),0us||(e.current=Fl[us],Fl[us]=null,us--)}function Me(e,n){us++,Fl[us]=e.current,e.current=n}var Hn={},ft=Vn(Hn),St=Vn(!1),xr=Hn;function cs(e,n){var i=e.type.contextTypes;if(!i)return Hn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=n[f];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function _t(e){return e=e.childContextTypes,e!=null}function Ti(){Be(St),Be(ft)}function _f(e,n,i){if(ft.current!==Hn)throw Error(s(168));Me(ft,n),Me(St,i)}function kf(e,n,i){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return i;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(s(108,ve(e)||"Unknown",c));return U({},i,a)}function Pi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hn,xr=ft.current,Me(ft,e),Me(St,St.current),!0}function bf(e,n,i){var a=e.stateNode;if(!a)throw Error(s(169));i?(e=kf(e,n,xr),a.__reactInternalMemoizedMergedChildContext=e,Be(St),Be(ft),Me(ft,e)):Be(St),Me(St,i)}var _n=null,Oi=!1,Dl=!1;function Cf(e){_n===null?_n=[e]:_n.push(e)}function cw(e){Oi=!0,Cf(e)}function qn(){if(!Dl&&_n!==null){Dl=!0;var e=0,n=Ie;try{var i=_n;for(Ie=1;e>=y,c-=y,kn=1<<32-Jt(n)+c|i<ye?(rt=fe,fe=null):rt=fe.sibling;var Le=V(D,fe,I[ye],Q);if(Le===null){fe===null&&(fe=rt);break}e&&fe&&Le.alternate===null&&n(D,fe),T=f(Le,T,ye),de===null?le=Le:de.sibling=Le,de=Le,fe=rt}if(ye===I.length)return i(D,fe),ze&&Sr(D,ye),le;if(fe===null){for(;yeye?(rt=fe,fe=null):rt=fe.sibling;var tr=V(D,fe,Le.value,Q);if(tr===null){fe===null&&(fe=rt);break}e&&fe&&tr.alternate===null&&n(D,fe),T=f(tr,T,ye),de===null?le=tr:de.sibling=tr,de=tr,fe=rt}if(Le.done)return i(D,fe),ze&&Sr(D,ye),le;if(fe===null){for(;!Le.done;ye++,Le=I.next())Le=q(D,Le.value,Q),Le!==null&&(T=f(Le,T,ye),de===null?le=Le:de.sibling=Le,de=Le);return ze&&Sr(D,ye),le}for(fe=a(D,fe);!Le.done;ye++,Le=I.next())Le=Z(fe,D,ye,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ye:Le.key),T=f(Le,T,ye),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(Vw){return n(D,Vw)}),ze&&Sr(D,ye),le}function Qe(D,T,I,Q){if(typeof I=="object"&&I!==null&&I.type===G&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case W:e:{for(var le=I.key,de=T;de!==null;){if(de.key===le){if(le=I.type,le===G){if(de.tag===7){i(D,de.sibling),T=c(de,I.props.children),T.return=D,D=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Se&&Nf(le)===de.type){i(D,de.sibling),T=c(de,I.props),T.ref=mo(D,de,I),T.return=D,D=T;break e}i(D,de);break}else n(D,de);de=de.sibling}I.type===G?(T=Or(I.props.children,D.mode,Q,I.key),T.return=D,D=T):(Q=sa(I.type,I.key,I.props,null,D.mode,Q),Q.ref=mo(D,T,I),Q.return=D,D=Q)}return y(D);case $:e:{for(de=I.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===I.containerInfo&&T.stateNode.implementation===I.implementation){i(D,T.sibling),T=c(T,I.children||[]),T.return=D,D=T;break e}else{i(D,T);break}else n(D,T);T=T.sibling}T=Nu(I,D.mode,Q),T.return=D,D=T}return y(D);case Se:return de=I._init,Qe(D,T,de(I._payload),Q)}if(Dn(I))return ne(D,T,I,Q);if(ae(I))return oe(D,T,I,Q);Fi(D,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,T!==null&&T.tag===6?(i(D,T.sibling),T=c(T,I),T.return=D,D=T):(i(D,T),T=Au(I,D.mode,Q),T.return=D,D=T),y(D)):i(D,T)}return Qe}var ps=Lf(!0),Ff=Lf(!1),Di=Vn(null),Ii=null,ms=null,zl=null;function $l(){zl=ms=Ii=null}function Wl(e){var n=Di.current;Be(Di),e._currentValue=n}function Vl(e,n,i){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===i)break;e=e.return}}function ys(e,n){Ii=e,zl=ms=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(kt=!0),e.firstContext=null)}function $t(e){var n=e._currentValue;if(zl!==e)if(e={context:e,memoizedValue:n,next:null},ms===null){if(Ii===null)throw Error(s(308));ms=e,Ii.dependencies={lanes:0,firstContext:e}}else ms=ms.next=e;return n}var _r=null;function Hl(e){_r===null?_r=[e]:_r.push(e)}function Df(e,n,i,a){var c=n.interleaved;return c===null?(i.next=i,Hl(n)):(i.next=c.next,c.next=i),n.interleaved=i,Cn(e,a)}function Cn(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Qn=!1;function ql(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function If(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Kn(e,n,i){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ne&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,Cn(e,i)}return c=a.interleaved,c===null?(n.next=n,Hl(a)):(n.next=c.next,c.next=n),a.interleaved=n,Cn(e,i)}function ji(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,i|=a,n.lanes=i,il(e,i)}}function jf(e,n){var i=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,i===a)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?c=f=n:f=f.next=n}else c=f=n;i={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function Mi(e,n,i,a){var c=e.updateQueue;Qn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var b=x,M=b.next;b.next=null,y===null?f=M:y.next=M,y=b;var H=e.alternate;H!==null&&(H=H.updateQueue,x=H.lastBaseUpdate,x!==y&&(x===null?H.firstBaseUpdate=M:x.next=M,H.lastBaseUpdate=b))}if(f!==null){var q=c.baseState;y=0,H=M=b=null,x=f;do{var V=x.lane,Z=x.eventTime;if((a&V)===V){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var ne=e,oe=x;switch(V=n,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){q=ne.call(Z,q,V);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,V=typeof ne=="function"?ne.call(Z,q,V):ne,V==null)break e;q=U({},q,V);break e;case 2:Qn=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,V=c.effects,V===null?c.effects=[x]:V.push(x))}else Z={eventTime:Z,lane:V,tag:x.tag,payload:x.payload,callback:x.callback,next:null},H===null?(M=H=Z,b=q):H=H.next=Z,y|=V;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;V=x,x=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);if(H===null&&(b=q),c.baseState=b,c.firstBaseUpdate=M,c.lastBaseUpdate=H,n=c.shared.interleaved,n!==null){c=n;do y|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Cr|=y,e.lanes=y,e.memoizedState=q}}function Mf(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;ni?i:4,e(!0);var a=Yl.transition;Yl.transition={};try{e(!1),n()}finally{Ie=i,Yl.transition=a}}function rh(){return Wt().memoizedState}function pw(e,n,i){var a=Jn(e);if(i={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null},sh(e))oh(n,i);else if(i=Df(e,n,i,a),i!==null){var c=xt();sn(i,e,a,c),ih(i,n,a)}}function mw(e,n,i){var a=Jn(e),c={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null};if(sh(e))oh(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,x=f(y,i);if(c.hasEagerState=!0,c.eagerState=x,Zt(x,y)){var b=n.interleaved;b===null?(c.next=c,Hl(n)):(c.next=b.next,b.next=c),n.interleaved=c;return}}catch{}finally{}i=Df(e,n,c,a),i!==null&&(c=xt(),sn(i,e,a,c),ih(i,n,a))}}function sh(e){var n=e.alternate;return e===We||n!==null&&n===We}function oh(e,n){wo=zi=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function ih(e,n,i){if((i&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,i|=a,n.lanes=i,il(e,i)}}var Vi={readContext:$t,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},yw={readContext:$t,useCallback:function(e,n){return hn().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:Gf,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,$i(4194308,4,Jf.bind(null,n,e),i)},useLayoutEffect:function(e,n){return $i(4194308,4,e,n)},useInsertionEffect:function(e,n){return $i(4,2,e,n)},useMemo:function(e,n){var i=hn();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var a=hn();return n=i!==void 0?i(n):n,a.memoizedState=a.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=pw.bind(null,We,e),[a.memoizedState,e]},useRef:function(e){var n=hn();return e={current:e},n.memoizedState=e},useState:Qf,useDebugValue:su,useDeferredValue:function(e){return hn().memoizedState=e},useTransition:function(){var e=Qf(!1),n=e[0];return e=hw.bind(null,e[1]),hn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var a=We,c=hn();if(ze){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),nt===null)throw Error(s(349));(br&30)!==0||$f(a,n,i)}c.memoizedState=i;var f={value:i,getSnapshot:n};return c.queue=f,Gf(Vf.bind(null,a,f,e),[e]),a.flags|=2048,So(9,Wf.bind(null,a,f,i,n),void 0,null),i},useId:function(){var e=hn(),n=nt.identifierPrefix;if(ze){var i=bn,a=kn;i=(a&~(1<<32-Jt(a)-1)).toString(32)+i,n=":"+n+"R"+i,i=xo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=y.createElement(i,{is:a.is}):(e=y.createElement(i),i==="select"&&(y=e,a.multiple?y.multiple=!0:a.size&&(y.size=a.size))):e=y.createElementNS(e,i),e[dn]=n,e[ho]=a,Ch(e,n,!1,!1),n.stateNode=e;e:{switch(y=Xa(i,a),i){case"dialog":Ue("cancel",e),Ue("close",e),c=a;break;case"iframe":case"object":case"embed":Ue("load",e),c=a;break;case"video":case"audio":for(c=0;cEs&&(n.flags|=128,a=!0,_o(f,!1),n.lanes=4194304)}else{if(!a)if(e=Ui(y),e!==null){if(n.flags|=128,a=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),_o(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!ze)return pt(n),null}else 2*qe()-f.renderingStartTime>Es&&i!==1073741824&&(n.flags|=128,a=!0,_o(f,!1),n.lanes=4194304);f.isBackwards?(y.sibling=n.child,n.child=y):(i=f.last,i!==null?i.sibling=y:n.child=y,f.last=y)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=qe(),n.sibling=null,i=$e.current,Me($e,a?i&1|2:i&1),n):(pt(n),null);case 22:case 23:return Tu(),a=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(Dt&1073741824)!==0&&(pt(n),n.subtreeFlags&6&&(n.flags|=8192)):pt(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function kw(e,n){switch(jl(n),n.tag){case 1:return _t(n.type)&&Ti(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return gs(),Be(St),Be(ft),Xl(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Kl(n),null;case 13:if(Be($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));hs()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Be($e),null;case 4:return gs(),null;case 10:return Wl(n.type._context),null;case 22:case 23:return Tu(),null;case 24:return null;default:return null}}var Ki=!1,mt=!1,bw=typeof WeakSet=="function"?WeakSet:Set,te=null;function ws(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(a){Ve(e,n,a)}else i.current=null}function yu(e,n,i){try{i()}catch(a){Ve(e,n,a)}}var Ph=!1;function Cw(e,n){if(Tl=pi,e=af(),xl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var a=i.getSelection&&i.getSelection();if(a&&a.rangeCount!==0){i=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,x=-1,b=-1,M=0,H=0,q=e,V=null;t:for(;;){for(var Z;q!==i||c!==0&&q.nodeType!==3||(x=y+c),q!==f||a!==0&&q.nodeType!==3||(b=y+a),q.nodeType===3&&(y+=q.nodeValue.length),(Z=q.firstChild)!==null;)V=q,q=Z;for(;;){if(q===e)break t;if(V===i&&++M===c&&(x=y),V===f&&++H===a&&(b=y),(Z=q.nextSibling)!==null)break;q=V,V=q.parentNode}q=Z}i=x===-1||b===-1?null:{start:x,end:b}}else i=null}i=i||{start:0,end:0}}else i=null;for(Pl={focusedElem:e,selectionRange:i},pi=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var ne=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Qe=ne.memoizedState,D=n.stateNode,T=D.getSnapshotBeforeUpdate(n.elementType===n.type?oe:tn(n.type,oe),Qe);D.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var I=n.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){Ve(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return ne=Ph,Ph=!1,ne}function ko(e,n,i){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&yu(n,i,f)}c=c.next}while(c!==a)}}function Gi(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.create;i.destroy=a()}i=i.next}while(i!==n)}}function gu(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function Oh(e){var n=e.alternate;n!==null&&(e.alternate=null,Oh(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[dn],delete n[ho],delete n[Ll],delete n[lw],delete n[uw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ah(e){return e.tag===5||e.tag===3||e.tag===4}function Nh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ah(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vu(e,n,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Ci));else if(a!==4&&(e=e.child,e!==null))for(vu(e,n,i),e=e.sibling;e!==null;)vu(e,n,i),e=e.sibling}function wu(e,n,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(wu(e,n,i),e=e.sibling;e!==null;)wu(e,n,i),e=e.sibling}var at=null,nn=!1;function Gn(e,n,i){for(i=i.child;i!==null;)Lh(e,n,i),i=i.sibling}function Lh(e,n,i){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(li,i)}catch{}switch(i.tag){case 5:mt||ws(i,n);case 6:var a=at,c=nn;at=null,Gn(e,n,i),at=a,nn=c,at!==null&&(nn?(e=at,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):at.removeChild(i.stateNode));break;case 18:at!==null&&(nn?(e=at,i=i.stateNode,e.nodeType===8?Nl(e.parentNode,i):e.nodeType===1&&Nl(e,i),to(e)):Nl(at,i.stateNode));break;case 4:a=at,c=nn,at=i.stateNode.containerInfo,nn=!0,Gn(e,n,i),at=a,nn=c;break;case 0:case 11:case 14:case 15:if(!mt&&(a=i.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&yu(i,n,y),c=c.next}while(c!==a)}Gn(e,n,i);break;case 1:if(!mt&&(ws(i,n),a=i.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=i.memoizedProps,a.state=i.memoizedState,a.componentWillUnmount()}catch(x){Ve(i,n,x)}Gn(e,n,i);break;case 21:Gn(e,n,i);break;case 22:i.mode&1?(mt=(a=mt)||i.memoizedState!==null,Gn(e,n,i),mt=a):Gn(e,n,i);break;default:Gn(e,n,i)}}function Fh(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new bw),n.forEach(function(a){var c=Dw.bind(null,e,a);i.has(a)||(i.add(a),a.then(c,c))})}}function rn(e,n){var i=n.deletions;if(i!==null)for(var a=0;ac&&(c=y),a&=~f}if(a=c,a=qe()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Tw(a/1960))-a,10e?16:e,Yn===null)var a=!1;else{if(e=Yn,Yn=null,ea=0,(Ne&6)!==0)throw Error(s(331));var c=Ne;for(Ne|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var x=f.deletions;if(x!==null){for(var b=0;bqe()-Su?Tr(e,0):Eu|=i),Ct(e,n)}function Qh(e,n){n===0&&((e.mode&1)===0?n=1:(n=ci,ci<<=1,(ci&130023424)===0&&(ci=4194304)));var i=xt();e=Cn(e,n),e!==null&&(Xs(e,n,i),Ct(e,i))}function Fw(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Qh(e,i)}function Dw(e,n){var i=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(s(314))}a!==null&&a.delete(n),Qh(e,i)}var Kh;Kh=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||St.current)kt=!0;else{if((e.lanes&i)===0&&(n.flags&128)===0)return kt=!1,Sw(e,n,i);kt=(e.flags&131072)!==0}else kt=!1,ze&&(n.flags&1048576)!==0&&Rf(n,Ni,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Qi(e,n),e=n.pendingProps;var c=cs(n,ft.current);ys(n,i),c=Zl(null,n,a,e,c,i);var f=eu();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,_t(a)?(f=!0,Pi(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ql(n),c.updater=Hi,n.stateNode=c,c._reactInternals=n,iu(n,a,e,i),n=cu(null,n,a,!0,f,i)):(n.tag=0,ze&&f&&Il(n),wt(null,n,c,i),n=n.child),n;case 16:a=n.elementType;e:{switch(Qi(e,n),e=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=jw(a),e=tn(a,e),c){case 0:n=uu(null,n,a,e,i);break e;case 1:n=xh(null,n,a,e,i);break e;case 11:n=mh(null,n,a,e,i);break e;case 14:n=yh(null,n,a,tn(a.type,e),i);break e}throw Error(s(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:tn(a,c),uu(e,n,a,c,i);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:tn(a,c),xh(e,n,a,c,i);case 3:e:{if(Eh(n),e===null)throw Error(s(387));a=n.pendingProps,f=n.memoizedState,c=f.element,If(e,n),Mi(n,a,null,i);var y=n.memoizedState;if(a=y.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=vs(Error(s(423)),n),n=Sh(e,n,a,i,c);break e}else if(a!==c){c=vs(Error(s(424)),n),n=Sh(e,n,a,i,c);break e}else for(Ft=Wn(n.stateNode.containerInfo.firstChild),Lt=n,ze=!0,en=null,i=Ff(n,null,a,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(hs(),a===c){n=Tn(e,n,i);break e}wt(e,n,a,i)}n=n.child}return n;case 5:return Uf(n),e===null&&Ul(n),a=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Ol(a,c)?y=null:f!==null&&Ol(a,f)&&(n.flags|=32),wh(e,n),wt(e,n,y,i),n.child;case 6:return e===null&&Ul(n),null;case 13:return _h(e,n,i);case 4:return Ql(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=ps(n,null,a,i):wt(e,n,a,i),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:tn(a,c),mh(e,n,a,c,i);case 7:return wt(e,n,n.pendingProps,i),n.child;case 8:return wt(e,n,n.pendingProps.children,i),n.child;case 12:return wt(e,n,n.pendingProps.children,i),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,y=c.value,Me(Di,a._currentValue),a._currentValue=y,f!==null)if(Zt(f.value,y)){if(f.children===c.children&&!St.current){n=Tn(e,n,i);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var x=f.dependencies;if(x!==null){y=f.child;for(var b=x.firstContext;b!==null;){if(b.context===a){if(f.tag===1){b=Rn(-1,i&-i),b.tag=2;var M=f.updateQueue;if(M!==null){M=M.shared;var H=M.pending;H===null?b.next=b:(b.next=H.next,H.next=b),M.pending=b}}f.lanes|=i,b=f.alternate,b!==null&&(b.lanes|=i),Vl(f.return,i,n),x.lanes|=i;break}b=b.next}}else if(f.tag===10)y=f.type===n.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=i,x=y.alternate,x!==null&&(x.lanes|=i),Vl(y,i,n),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}wt(e,n,c.children,i),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,ys(n,i),c=$t(c),a=a(c),n.flags|=1,wt(e,n,a,i),n.child;case 14:return a=n.type,c=tn(a,n.pendingProps),c=tn(a.type,c),yh(e,n,a,c,i);case 15:return gh(e,n,n.type,n.pendingProps,i);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:tn(a,c),Qi(e,n),n.tag=1,_t(a)?(e=!0,Pi(n)):e=!1,ys(n,i),lh(n,a,c),iu(n,a,c,i),cu(null,n,a,!0,e,i);case 19:return bh(e,n,i);case 22:return vh(e,n,i)}throw Error(s(156,n.tag))};function Gh(e,n){return Rd(e,n)}function Iw(e,n,i,a){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,n,i,a){return new Iw(e,n,i,a)}function Ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jw(e){if(typeof e=="function")return Ou(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===_e)return 14}return 2}function er(e,n){var i=e.alternate;return i===null?(i=Ht(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function sa(e,n,i,a,c,f){var y=2;if(a=e,typeof e=="function")Ou(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Or(i.children,c,f,n);case z:y=8,c|=8;break;case ie:return e=Ht(12,i,n,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=Ht(13,i,n,c),e.elementType=xe,e.lanes=f,e;case J:return e=Ht(19,i,n,c),e.elementType=J,e.lanes=f,e;case ke:return oa(i,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:y=10;break e;case Ee:y=9;break e;case Te:y=11;break e;case _e:y=14;break e;case Se:y=16,a=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Ht(y,i,n,c),n.elementType=e,n.type=a,n.lanes=f,n}function Or(e,n,i,a){return e=Ht(7,e,a,n),e.lanes=i,e}function oa(e,n,i,a){return e=Ht(22,e,a,n),e.elementType=ke,e.lanes=i,e.stateNode={isHidden:!1},e}function Au(e,n,i){return e=Ht(6,e,null,n),e.lanes=i,e}function Nu(e,n,i){return n=Ht(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Mw(e,n,i,a,c){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ol(0),this.expirationTimes=ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ol(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Lu(e,n,i,a,c,f,y,x,b){return e=new Mw(e,n,i,x,b),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Ht(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:a,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},ql(f),e}function Uw(e,n,i){var a=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),Bu.exports=Zw(),Bu.exports}var cp;function e0(){if(cp)return ha;cp=1;var r=$m();return ha.createRoot=r.createRoot,ha.hydrateRoot=r.hydrateRoot,ha}var t0=e0();const n0=Ic(t0),r0=20,s0=1e6,Fn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Wu=0;function o0(){return Wu=(Wu+1)%Number.MAX_VALUE,Wu.toString()}const Vu=new Map,dp=r=>{if(Vu.has(r))return;const t=setTimeout(()=>{Vu.delete(r),Bo({type:Fn.REMOVE_TOAST,toastId:r})},s0);Vu.set(r,t)},i0=(r,t)=>{switch(t.type){case Fn.ADD_TOAST:return{...r,toasts:[t.toast,...r.toasts].slice(0,r0)};case Fn.UPDATE_TOAST:return{...r,toasts:r.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Fn.DISMISS_TOAST:{const{toastId:s}=t;return s?dp(s):r.toasts.forEach(o=>{dp(o.id)}),{...r,toasts:r.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case Fn.REMOVE_TOAST:return t.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(s=>s.id!==t.toastId)}}},_a=[];let ka={toasts:[]};function Bo(r){ka=i0(ka,r),_a.forEach(t=>{t(ka)})}function a0({...r}){const t=o0(),s=l=>Bo({type:Fn.UPDATE_TOAST,toast:{...l,id:t}}),o=()=>Bo({type:Fn.DISMISS_TOAST,toastId:t});return Bo({type:Fn.ADD_TOAST,toast:{...r,id:t,open:!0,onOpenChange:l=>{l||o()}}}),{id:t,dismiss:o,update:s}}function l0(){const[r,t]=R.useState(ka);return R.useEffect(()=>(_a.push(t),()=>{const s=_a.indexOf(t);s>-1&&_a.splice(s,1)}),[r]),{...r,toast:a0,dismiss:s=>Bo({type:Fn.DISMISS_TOAST,toastId:s})}}var Mc=$m();const u0=Ic(Mc);function It(r,t,{checkForDefaultPrevented:s=!0}={}){return function(l){if(r==null||r(l),s===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function fp(r,t){if(typeof r=="function")return r(t);r!=null&&(r.current=t)}function Uc(...r){return t=>{let s=!1;const o=r.map(l=>{const u=fp(l,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let l=0;l{var E;const{scope:_,children:N,...j}=v,k=((E=_==null?void 0:_[r])==null?void 0:E[p])||h,w=R.useMemo(()=>j,Object.values(j));return S.jsx(k.Provider,{value:w,children:N})};m.displayName=u+"Provider";function g(v,_){var k;const N=((k=_==null?void 0:_[r])==null?void 0:k[p])||h,j=R.useContext(N);if(j)return j;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[m,g]}const l=()=>{const u=s.map(d=>R.createContext(d));return function(h){const p=(h==null?void 0:h[r])||u;return R.useMemo(()=>({[`__scope${r}`]:{...h,[r]:p}}),[h,p])}};return l.scopeName=r,[o,c0(l,...t)]}function c0(...r){const t=r[0];if(r.length===1)return t;const s=()=>{const o=r.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(u){const d=o.reduce((h,{useScope:p,scopeName:m})=>{const v=p(u)[`__scope${m}`];return{...h,...v}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function hp(r){const t=d0(r),s=R.forwardRef((o,l)=>{const{children:u,...d}=o,h=R.Children.toArray(u),p=h.find(h0);if(p){const m=p.props.children,g=h.map(v=>v===p?R.Children.count(m)>1?R.Children.only(null):R.isValidElement(m)?m.props.children:null:v);return S.jsx(t,{...d,ref:l,children:R.isValidElement(m)?R.cloneElement(m,void 0,g):null})}return S.jsx(t,{...d,ref:l,children:u})});return s.displayName=`${r}.Slot`,s}function d0(r){const t=R.forwardRef((s,o)=>{const{children:l,...u}=s;if(R.isValidElement(l)){const d=m0(l),h=p0(u,l.props);return l.type!==R.Fragment&&(h.ref=o?Uc(o,d):d),R.cloneElement(l,h)}return R.Children.count(l)>1?R.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var f0=Symbol("radix.slottable");function h0(r){return R.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===f0}function p0(r,t){const s={...t};for(const o in t){const l=r[o],u=t[o];/^on[A-Z]/.test(o)?l&&u?s[o]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(s[o]=l):o==="style"?s[o]={...l,...u}:o==="className"&&(s[o]=[l,u].filter(Boolean).join(" "))}return{...r,...s}}function m0(r){var o,l;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(l=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:l.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}function y0(r){const t=r+"CollectionProvider",[s,o]=Wm(t),[l,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:w,children:E}=k,F=sr.useRef(null),A=sr.useRef(new Map).current;return S.jsx(l,{scope:w,itemMap:A,collectionRef:F,children:E})};d.displayName=t;const h=r+"CollectionSlot",p=hp(h),m=sr.forwardRef((k,w)=>{const{scope:E,children:F}=k,A=u(h,E),L=Qr(w,A.collectionRef);return S.jsx(p,{ref:L,children:F})});m.displayName=h;const g=r+"CollectionItemSlot",v="data-radix-collection-item",_=hp(g),N=sr.forwardRef((k,w)=>{const{scope:E,children:F,...A}=k,L=sr.useRef(null),W=Qr(w,L),$=u(g,E);return sr.useEffect(()=>($.itemMap.set(L,{ref:L,...A}),()=>void $.itemMap.delete(L))),S.jsx(_,{[v]:"",ref:W,children:F})});N.displayName=g;function j(k){const w=u(r+"CollectionConsumer",k);return sr.useCallback(()=>{const F=w.collectionRef.current;if(!F)return[];const A=Array.from(F.querySelectorAll(`[${v}]`));return Array.from(w.itemMap.values()).sort(($,G)=>A.indexOf($.ref.current)-A.indexOf(G.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:d,Slot:m,ItemSlot:N},j,o]}function g0(r){const t=v0(r),s=R.forwardRef((o,l)=>{const{children:u,...d}=o,h=R.Children.toArray(u),p=h.find(x0);if(p){const m=p.props.children,g=h.map(v=>v===p?R.Children.count(m)>1?R.Children.only(null):R.isValidElement(m)?m.props.children:null:v);return S.jsx(t,{...d,ref:l,children:R.isValidElement(m)?R.cloneElement(m,void 0,g):null})}return S.jsx(t,{...d,ref:l,children:u})});return s.displayName=`${r}.Slot`,s}function v0(r){const t=R.forwardRef((s,o)=>{const{children:l,...u}=s;if(R.isValidElement(l)){const d=S0(l),h=E0(u,l.props);return l.type!==R.Fragment&&(h.ref=o?Uc(o,d):d),R.cloneElement(l,h)}return R.Children.count(l)>1?R.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var w0=Symbol("radix.slottable");function x0(r){return R.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===w0}function E0(r,t){const s={...t};for(const o in t){const l=r[o],u=t[o];/^on[A-Z]/.test(o)?l&&u?s[o]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(s[o]=l):o==="style"?s[o]={...l,...u}:o==="className"&&(s[o]=[l,u].filter(Boolean).join(" "))}return{...r,...s}}function S0(r){var o,l;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(l=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:l.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var _0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xn=_0.reduce((r,t)=>{const s=g0(`Primitive.${t}`),o=R.forwardRef((l,u)=>{const{asChild:d,...h}=l,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${t}`,{...r,[t]:o}},{});function Vm(r,t){r&&Mc.flushSync(()=>r.dispatchEvent(t))}function Kr(r){const t=R.useRef(r);return R.useEffect(()=>{t.current=r}),R.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function k0(r,t=globalThis==null?void 0:globalThis.document){const s=Kr(r);R.useEffect(()=>{const o=l=>{l.key==="Escape"&&s(l)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var b0="DismissableLayer",rc="dismissableLayer.update",C0="dismissableLayer.pointerDownOutside",R0="dismissableLayer.focusOutside",pp,Hm=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qm=R.forwardRef((r,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=r,m=R.useContext(Hm),[g,v]=R.useState(null),_=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,N]=R.useState({}),j=Qr(t,G=>v(G)),k=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(w),F=g?k.indexOf(g):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,L=F>=E,W=P0(G=>{const z=G.target,ie=[...m.branches].some(ue=>ue.contains(z));!L||ie||(l==null||l(G),d==null||d(G),G.defaultPrevented||h==null||h())},_),$=O0(G=>{const z=G.target;[...m.branches].some(ue=>ue.contains(z))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},_);return k0(G=>{F===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},_),R.useEffect(()=>{if(g)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(pp=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),mp(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=pp)}},[g,_,s,m]),R.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),mp())},[g,m]),R.useEffect(()=>{const G=()=>N({});return document.addEventListener(rc,G),()=>document.removeEventListener(rc,G)},[]),S.jsx(xn.div,{...p,ref:j,style:{pointerEvents:A?L?"auto":"none":void 0,...r.style},onFocusCapture:It(r.onFocusCapture,$.onFocusCapture),onBlurCapture:It(r.onBlurCapture,$.onBlurCapture),onPointerDownCapture:It(r.onPointerDownCapture,W.onPointerDownCapture)})});qm.displayName=b0;var T0="DismissableLayerBranch",Qm=R.forwardRef((r,t)=>{const s=R.useContext(Hm),o=R.useRef(null),l=Qr(t,o);return R.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),S.jsx(xn.div,{...r,ref:l})});Qm.displayName=T0;function P0(r,t=globalThis==null?void 0:globalThis.document){const s=Kr(r),o=R.useRef(!1),l=R.useRef(()=>{});return R.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){Km(C0,s,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=p,t.addEventListener("click",l.current,{once:!0})):p()}else t.removeEventListener("click",l.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",l.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function O0(r,t=globalThis==null?void 0:globalThis.document){const s=Kr(r),o=R.useRef(!1);return R.useEffect(()=>{const l=u=>{u.target&&!o.current&&Km(R0,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function mp(){const r=new CustomEvent(rc);document.dispatchEvent(r)}function Km(r,t,s,{discrete:o}){const l=s.originalEvent.target,u=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:s});t&&l.addEventListener(r,t,{once:!0}),o?Vm(l,u):l.dispatchEvent(u)}var A0=qm,N0=Qm,$o=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},L0="Portal",Gm=R.forwardRef((r,t)=>{var h;const{container:s,...o}=r,[l,u]=R.useState(!1);$o(()=>u(!0),[]);const d=s||l&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?u0.createPortal(S.jsx(xn.div,{...o,ref:t}),d):null});Gm.displayName=L0;function F0(r,t){return R.useReducer((s,o)=>t[s][o]??s,r)}var Xm=r=>{const{present:t,children:s}=r,o=D0(t),l=typeof s=="function"?s({present:o.isPresent}):R.Children.only(s),u=Qr(o.ref,I0(l));return typeof s=="function"||o.isPresent?R.cloneElement(l,{ref:u}):null};Xm.displayName="Presence";function D0(r){const[t,s]=R.useState(),o=R.useRef(null),l=R.useRef(r),u=R.useRef("none"),d=r?"mounted":"unmounted",[h,p]=F0(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const m=pa(o.current);u.current=h==="mounted"?m:"none"},[h]),$o(()=>{const m=o.current,g=l.current;if(g!==r){const _=u.current,N=pa(m);r?p("MOUNT"):N==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(g&&_!==N?"ANIMATION_OUT":"UNMOUNT"),l.current=r}},[r,p]),$o(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,v=N=>{const k=pa(o.current).includes(CSS.escape(N.animationName));if(N.target===t&&k&&(p("ANIMATION_END"),!l.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},_=N=>{N.target===t&&(u.current=pa(o.current))};return t.addEventListener("animationstart",_),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",_),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:R.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function pa(r){return(r==null?void 0:r.animationName)||"none"}function I0(r){var o,l;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(l=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:l.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var j0=zm[" useInsertionEffect ".trim().toString()]||$o;function M0({prop:r,defaultProp:t,onChange:s=()=>{},caller:o}){const[l,u,d]=U0({defaultProp:t,onChange:s}),h=r!==void 0,p=h?r:l;{const g=R.useRef(r!==void 0);R.useEffect(()=>{const v=g.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=h},[h,o])}const m=R.useCallback(g=>{var v;if(h){const _=B0(g)?g(r):g;_!==r&&((v=d.current)==null||v.call(d,_))}else u(g)},[h,r,u,d]);return[p,m]}function U0({defaultProp:r,onChange:t}){const[s,o]=R.useState(r),l=R.useRef(s),u=R.useRef(t);return j0(()=>{u.current=t},[t]),R.useEffect(()=>{var d;l.current!==s&&((d=u.current)==null||d.call(u,s),l.current=s)},[s,l]),[s,o,u]}function B0(r){return typeof r=="function"}var z0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$0="VisuallyHidden",Bc=R.forwardRef((r,t)=>S.jsx(xn.span,{...r,ref:t,style:{...z0,...r.style}}));Bc.displayName=$0;var zc="ToastProvider",[$c,W0,V0]=y0("Toast"),[Ym]=Wm("Toast",[V0]),[H0,Ba]=Ym(zc),Jm=r=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:l="right",swipeThreshold:u=50,children:d}=r,[h,p]=R.useState(null),[m,g]=R.useState(0),v=R.useRef(!1),_=R.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${zc}\`. Expected non-empty \`string\`.`),S.jsx($c.Provider,{scope:t,children:S.jsx(H0,{scope:t,label:s,duration:o,swipeDirection:l,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:R.useCallback(()=>g(N=>N+1),[]),onToastRemove:R.useCallback(()=>g(N=>N-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:_,children:d})})};Jm.displayName=zc;var Zm="ToastViewport",q0=["F8"],sc="toast.viewportPause",oc="toast.viewportResume",ey=R.forwardRef((r,t)=>{const{__scopeToast:s,hotkey:o=q0,label:l="Notifications ({hotkey})",...u}=r,d=Ba(Zm,s),h=W0(s),p=R.useRef(null),m=R.useRef(null),g=R.useRef(null),v=R.useRef(null),_=Qr(t,v,d.onViewportChange),N=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=d.toastCount>0;R.useEffect(()=>{const w=E=>{var A;o.length!==0&&o.every(L=>E[L]||E.code===L)&&((A=v.current)==null||A.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[o]),R.useEffect(()=>{const w=p.current,E=v.current;if(j&&w&&E){const F=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(sc);E.dispatchEvent($),d.isClosePausedRef.current=!0}},A=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(oc);E.dispatchEvent($),d.isClosePausedRef.current=!1}},L=$=>{!w.contains($.relatedTarget)&&A()},W=()=>{w.contains(document.activeElement)||A()};return w.addEventListener("focusin",F),w.addEventListener("focusout",L),w.addEventListener("pointermove",F),w.addEventListener("pointerleave",W),window.addEventListener("blur",F),window.addEventListener("focus",A),()=>{w.removeEventListener("focusin",F),w.removeEventListener("focusout",L),w.removeEventListener("pointermove",F),w.removeEventListener("pointerleave",W),window.removeEventListener("blur",F),window.removeEventListener("focus",A)}}},[j,d.isClosePausedRef]);const k=R.useCallback(({tabbingDirection:w})=>{const F=h().map(A=>{const L=A.ref.current,W=[L,...ox(L)];return w==="forwards"?W:W.reverse()});return(w==="forwards"?F.reverse():F).flat()},[h]);return R.useEffect(()=>{const w=v.current;if(w){const E=F=>{var W,$,G;const A=F.altKey||F.ctrlKey||F.metaKey;if(F.key==="Tab"&&!A){const z=document.activeElement,ie=F.shiftKey;if(F.target===w&&ie){(W=m.current)==null||W.focus();return}const Te=k({tabbingDirection:ie?"backwards":"forwards"}),xe=Te.findIndex(J=>J===z);Hu(Te.slice(xe+1))?F.preventDefault():ie?($=m.current)==null||$.focus():(G=g.current)==null||G.focus()}};return w.addEventListener("keydown",E),()=>w.removeEventListener("keydown",E)}},[h,k]),S.jsxs(N0,{ref:p,role:"region","aria-label":l.replace("{hotkey}",N),tabIndex:-1,style:{pointerEvents:j?void 0:"none"},children:[j&&S.jsx(ic,{ref:m,onFocusFromOutsideViewport:()=>{const w=k({tabbingDirection:"forwards"});Hu(w)}}),S.jsx($c.Slot,{scope:s,children:S.jsx(xn.ol,{tabIndex:-1,...u,ref:_})}),j&&S.jsx(ic,{ref:g,onFocusFromOutsideViewport:()=>{const w=k({tabbingDirection:"backwards"});Hu(w)}})]})});ey.displayName=Zm;var ty="ToastFocusProxy",ic=R.forwardRef((r,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...l}=r,u=Ba(ty,s);return S.jsx(Bc,{tabIndex:0,...l,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const h=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(h))&&o()}})});ic.displayName=ty;var Yo="Toast",Q0="toast.swipeStart",K0="toast.swipeMove",G0="toast.swipeCancel",X0="toast.swipeEnd",ny=R.forwardRef((r,t)=>{const{forceMount:s,open:o,defaultOpen:l,onOpenChange:u,...d}=r,[h,p]=M0({prop:o,defaultProp:l??!0,onChange:u,caller:Yo});return S.jsx(Xm,{present:s||h,children:S.jsx(Z0,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:Kr(r.onPause),onResume:Kr(r.onResume),onSwipeStart:It(r.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(r.onSwipeMove,m=>{const{x:g,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:It(r.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(r.onSwipeEnd,m=>{const{x:g,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),p(!1)})})})});ny.displayName=Yo;var[Y0,J0]=Ym(Yo,{onClose(){}}),Z0=R.forwardRef((r,t)=>{const{__scopeToast:s,type:o="foreground",duration:l,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:g,onSwipeMove:v,onSwipeCancel:_,onSwipeEnd:N,...j}=r,k=Ba(Yo,s),[w,E]=R.useState(null),F=Qr(t,J=>E(J)),A=R.useRef(null),L=R.useRef(null),W=l||k.duration,$=R.useRef(0),G=R.useRef(W),z=R.useRef(0),{onToastAdd:ie,onToastRemove:ue}=k,Ee=Kr(()=>{var _e;(w==null?void 0:w.contains(document.activeElement))&&((_e=k.viewport)==null||_e.focus()),d()}),Te=R.useCallback(J=>{!J||J===1/0||(window.clearTimeout(z.current),$.current=new Date().getTime(),z.current=window.setTimeout(Ee,J))},[Ee]);R.useEffect(()=>{const J=k.viewport;if(J){const _e=()=>{Te(G.current),m==null||m()},Se=()=>{const ke=new Date().getTime()-$.current;G.current=G.current-ke,window.clearTimeout(z.current),p==null||p()};return J.addEventListener(sc,Se),J.addEventListener(oc,_e),()=>{J.removeEventListener(sc,Se),J.removeEventListener(oc,_e)}}},[k.viewport,W,p,m,Te]),R.useEffect(()=>{u&&!k.isClosePausedRef.current&&Te(W)},[u,W,k.isClosePausedRef,Te]),R.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=R.useMemo(()=>w?uy(w):null,[w]);return k.viewport?S.jsxs(S.Fragment,{children:[xe&&S.jsx(ex,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),S.jsx(Y0,{scope:s,onClose:Ee,children:Mc.createPortal(S.jsx($c.ItemSlot,{scope:s,children:S.jsx(A0,{asChild:!0,onEscapeKeyDown:It(h,()=>{k.isFocusedToastEscapeKeyDownRef.current||Ee(),k.isFocusedToastEscapeKeyDownRef.current=!1}),children:S.jsx(xn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":k.swipeDirection,...j,ref:F,style:{userSelect:"none",touchAction:"none",...r.style},onKeyDown:It(r.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(k.isFocusedToastEscapeKeyDownRef.current=!0,Ee()))}),onPointerDown:It(r.onPointerDown,J=>{J.button===0&&(A.current={x:J.clientX,y:J.clientY})}),onPointerMove:It(r.onPointerMove,J=>{if(!A.current)return;const _e=J.clientX-A.current.x,Se=J.clientY-A.current.y,ke=!!L.current,K=["left","right"].includes(k.swipeDirection),ae=["left","up"].includes(k.swipeDirection)?Math.min:Math.max,U=K?ae(0,_e):0,P=K?0:ae(0,Se),B=J.pointerType==="touch"?10:2,ce={x:U,y:P},me={originalEvent:J,delta:ce};ke?(L.current=ce,ma(K0,v,me,{discrete:!1})):yp(ce,k.swipeDirection,B)?(L.current=ce,ma(Q0,g,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(_e)>B||Math.abs(Se)>B)&&(A.current=null)}),onPointerUp:It(r.onPointerUp,J=>{const _e=L.current,Se=J.target;if(Se.hasPointerCapture(J.pointerId)&&Se.releasePointerCapture(J.pointerId),L.current=null,A.current=null,_e){const ke=J.currentTarget,K={originalEvent:J,delta:_e};yp(_e,k.swipeDirection,k.swipeThreshold)?ma(X0,N,K,{discrete:!0}):ma(G0,_,K,{discrete:!0}),ke.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),k.viewport)})]}):null}),ex=r=>{const{__scopeToast:t,children:s,...o}=r,l=Ba(Yo,t),[u,d]=R.useState(!1),[h,p]=R.useState(!1);return rx(()=>d(!0)),R.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:S.jsx(Gm,{asChild:!0,children:S.jsx(Bc,{...o,children:u&&S.jsxs(S.Fragment,{children:[l.label," ",s]})})})},tx="ToastTitle",ry=R.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return S.jsx(xn.div,{...o,ref:t})});ry.displayName=tx;var nx="ToastDescription",sy=R.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return S.jsx(xn.div,{...o,ref:t})});sy.displayName=nx;var oy="ToastAction",iy=R.forwardRef((r,t)=>{const{altText:s,...o}=r;return s.trim()?S.jsx(ly,{altText:s,asChild:!0,children:S.jsx(Wc,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${oy}\`. Expected non-empty \`string\`.`),null)});iy.displayName=oy;var ay="ToastClose",Wc=R.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r,l=J0(ay,s);return S.jsx(ly,{asChild:!0,children:S.jsx(xn.button,{type:"button",...o,ref:t,onClick:It(r.onClick,l.onClose)})})});Wc.displayName=ay;var ly=R.forwardRef((r,t)=>{const{__scopeToast:s,altText:o,...l}=r;return S.jsx(xn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...l,ref:t})});function uy(r){const t=[];return Array.from(r.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),sx(o)){const l=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!l)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...uy(o))}}),t}function ma(r,t,s,{discrete:o}){const l=s.originalEvent.currentTarget,u=new CustomEvent(r,{bubbles:!0,cancelable:!0,detail:s});t&&l.addEventListener(r,t,{once:!0}),o?Vm(l,u):l.dispatchEvent(u)}var yp=(r,t,s=0)=>{const o=Math.abs(r.x),l=Math.abs(r.y),u=o>l;return t==="left"||t==="right"?u&&o>s:!u&&l>s};function rx(r=()=>{}){const t=Kr(r);$o(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function sx(r){return r.nodeType===r.ELEMENT_NODE}function ox(r){const t=[],s=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Hu(r){const t=document.activeElement;return r.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var ix=Jm,cy=ey,dy=ny,fy=ry,hy=sy,py=iy,my=Wc;function yy(r){var t,s,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var l=r.length;for(t=0;ttypeof r=="boolean"?`${r}`:r===0?"0":r,vp=gy,ax=(r,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return vp(r,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:u}=t,d=Object.keys(l).map(m=>{const g=s==null?void 0:s[m],v=u==null?void 0:u[m];if(g===null)return null;const _=gp(g)||gp(v);return l[m][_]}),h=s&&Object.entries(s).reduce((m,g)=>{let[v,_]=g;return _===void 0||(m[v]=_),m},{}),p=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:v,className:_,...N}=g;return Object.entries(N).every(j=>{let[k,w]=j;return Array.isArray(w)?w.includes({...u,...h}[k]):{...u,...h}[k]===w})?[...m,v,_]:m},[]);return vp(r,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lx=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vy=(...r)=>r.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ux={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cx=R.forwardRef(({color:r="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:l="",children:u,iconNode:d,...h},p)=>R.createElement("svg",{ref:p,...ux,width:t,height:t,stroke:r,strokeWidth:o?Number(s)*24/Number(t):s,className:vy("lucide",l),...h},[...d.map(([m,g])=>R.createElement(m,g)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dx=(r,t)=>{const s=R.forwardRef(({className:o,...l},u)=>R.createElement(cx,{ref:u,iconNode:t,className:vy(`lucide-${lx(r)}`,o),...l}));return s.displayName=`${r}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hx=dx("X",fx),px=(r,t)=>{const s=new Array(r.length+t.length);for(let o=0;o({classGroupId:r,validator:t}),wy=(r=new Map,t=null,s)=>({nextPart:r,validators:t,classGroupId:s}),Na="-",wp=[],yx="arbitrary..",gx=r=>{const t=wx(r),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=r;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return vx(d);const h=d.split(Na),p=h[0]===""&&h.length>1?1:0;return xy(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=o[d],m=s[d];return p?m?px(m,p):p:m||wp}return s[d]||wp}}},xy=(r,t,s)=>{if(r.length-t===0)return s.classGroupId;const l=r[t],u=s.nextPart.get(l);if(u){const m=xy(r,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const h=t===0?r.join(Na):r.slice(t).join(Na),p=d.length;for(let m=0;mr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?yx+o:void 0})(),wx=r=>{const{theme:t,classGroups:s}=r;return xx(s,t)},xx=(r,t)=>{const s=wy();for(const o in r){const l=r[o];Vc(l,s,o,t)}return s},Vc=(r,t,s,o)=>{const l=r.length;for(let u=0;u{if(typeof r=="string"){Sx(r,t,s);return}if(typeof r=="function"){_x(r,t,s,o);return}kx(r,t,s,o)},Sx=(r,t,s)=>{const o=r===""?t:Ey(t,r);o.classGroupId=s},_x=(r,t,s,o)=>{if(bx(r)){Vc(r(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(mx(s,r))},kx=(r,t,s,o)=>{const l=Object.entries(r),u=l.length;for(let d=0;d{let s=r;const o=t.split(Na),l=o.length;for(let u=0;u"isThemeGetter"in r&&r.isThemeGetter===!0,Cx=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const l=(u,d)=>{s[u]=d,t++,t>r&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return l(u,d),d},set(u,d){u in s?s[u]=d:l(u,d)}}},ac="!",xp=":",Rx=[],Ep=(r,t,s,o,l)=>({modifiers:r,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:l}),Tx=r=>{const{prefix:t,experimentalParseClassName:s}=r;let o=l=>{const u=[];let d=0,h=0,p=0,m;const g=l.length;for(let k=0;kp?m-p:void 0;return Ep(u,N,_,j)};if(t){const l=t+xp,u=o;o=d=>d.startsWith(l)?u(d.slice(l.length)):Ep(Rx,!1,d,void 0,!0)}if(s){const l=o;o=u=>s({className:u,parseClassName:l})}return o},Px=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let l=[];for(let u=0;u0&&(l.sort(),o.push(...l),l=[]),o.push(d)):l.push(d)}return l.length>0&&(l.sort(),o.push(...l)),o}},Ox=r=>({cache:Cx(r.cacheSize),parseClassName:Tx(r),sortModifiers:Px(r),...gx(r)}),Ax=/\s+/,Nx=(r,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:l,sortModifiers:u}=t,d=[],h=r.trim().split(Ax);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:v,modifiers:_,hasImportantModifier:N,baseClassName:j,maybePostfixModifierPosition:k}=s(g);if(v){p=g+(p.length>0?" "+p:p);continue}let w=!!k,E=o(w?j.substring(0,k):j);if(!E){if(!w){p=g+(p.length>0?" "+p:p);continue}if(E=o(j),!E){p=g+(p.length>0?" "+p:p);continue}w=!1}const F=_.length===0?"":_.length===1?_[0]:u(_).join(":"),A=N?F+ac:F,L=A+E;if(d.indexOf(L)>-1)continue;d.push(L);const W=l(E,w);for(let $=0;$0?" "+p:p)}return p},Lx=(...r)=>{let t=0,s,o,l="";for(;t{if(typeof r=="string")return r;let t,s="";for(let o=0;o{let s,o,l,u;const d=p=>{const m=t.reduce((g,v)=>v(g),r());return s=Ox(m),o=s.cache.get,l=s.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const g=Nx(p,s);return l(p,g),g};return u=d,(...p)=>u(Lx(...p))},Dx=[],Ze=r=>{const t=s=>s[r]||Dx;return t.isThemeGetter=!0,t},_y=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ky=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ix=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mx=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ux=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Bx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=r=>Ix.test(r),be=r=>!!r&&!Number.isNaN(Number(r)),rr=r=>!!r&&Number.isInteger(Number(r)),qu=r=>r.endsWith("%")&&be(r.slice(0,-1)),On=r=>jx.test(r),by=()=>!0,$x=r=>Mx.test(r)&&!Ux.test(r),Hc=()=>!1,Wx=r=>Bx.test(r),Vx=r=>zx.test(r),Hx=r=>!re(r)&&!se(r),qx=r=>gr(r,Ty,Hc),re=r=>_y.test(r),Ar=r=>gr(r,Py,$x),Sp=r=>gr(r,eE,be),Qx=r=>gr(r,Ay,by),Kx=r=>gr(r,Oy,Hc),_p=r=>gr(r,Cy,Hc),Gx=r=>gr(r,Ry,Vx),ya=r=>gr(r,Ny,Wx),se=r=>ky.test(r),Oo=r=>Jr(r,Py),Xx=r=>Jr(r,Oy),kp=r=>Jr(r,Cy),Yx=r=>Jr(r,Ty),Jx=r=>Jr(r,Ry),ga=r=>Jr(r,Ny,!0),Zx=r=>Jr(r,Ay,!0),gr=(r,t,s)=>{const o=_y.exec(r);return o?o[1]?t(o[1]):s(o[2]):!1},Jr=(r,t,s=!1)=>{const o=ky.exec(r);return o?o[1]?t(o[1]):s:!1},Cy=r=>r==="position"||r==="percentage",Ry=r=>r==="image"||r==="url",Ty=r=>r==="length"||r==="size"||r==="bg-size",Py=r=>r==="length",eE=r=>r==="number",Oy=r=>r==="family-name",Ay=r=>r==="number"||r==="weight",Ny=r=>r==="shadow",tE=()=>{const r=Ze("color"),t=Ze("font"),s=Ze("text"),o=Ze("font-weight"),l=Ze("tracking"),u=Ze("leading"),d=Ze("breakpoint"),h=Ze("container"),p=Ze("spacing"),m=Ze("radius"),g=Ze("shadow"),v=Ze("inset-shadow"),_=Ze("text-shadow"),N=Ze("drop-shadow"),j=Ze("blur"),k=Ze("perspective"),w=Ze("aspect"),E=Ze("ease"),F=Ze("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],W=()=>[...L(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],z=()=>[se,re,p],ie=()=>[nr,"full","auto",...z()],ue=()=>[rr,"none","subgrid",se,re],Ee=()=>["auto",{span:["full",rr,se,re]},rr,se,re],Te=()=>[rr,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_e=()=>["start","end","center","stretch","center-safe","end-safe"],Se=()=>["auto",...z()],ke=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],K=()=>[nr,"screen","full","dvw","lvw","svw","min","max","fit",...z()],ae=()=>[nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],U=()=>[r,se,re],P=()=>[...L(),kp,_p,{position:[se,re]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",Yx,qx,{size:[se,re]}],me=()=>[qu,Oo,Ar],he=()=>["","none","full",m,se,re],X=()=>["",be,Oo,Ar],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[be,qu,kp,_p],et=()=>["","none",j,se,re],jt=()=>["none",be,se,re],ot=()=>["none",be,se,re],Gt=()=>[be,se,re],Mt=()=>[nr,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[by],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[Hx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",be],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,re,se,w]}],container:["container"],columns:[{columns:[be,re,se,h]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:W()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[rr,"auto",se,re]}],basis:[{basis:[nr,"full","auto",h,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,nr,"auto","initial","none",re]}],grow:[{grow:["",be,se,re]}],shrink:[{shrink:["",be,se,re]}],order:[{order:[rr,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:Ee()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:Ee()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[..._e(),"normal"]}],"justify-self":[{"justify-self":["auto",..._e()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[..._e(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._e(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[..._e(),"baseline"]}],"place-self":[{"place-self":["auto",..._e()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:Se()}],mx:[{mx:Se()}],my:[{my:Se()}],ms:[{ms:Se()}],me:[{me:Se()}],mbs:[{mbs:Se()}],mbe:[{mbe:Se()}],mt:[{mt:Se()}],mr:[{mr:Se()}],mb:[{mb:Se()}],ml:[{ml:Se()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:ke()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",...ke()]}],"min-w":[{"min-w":[h,"screen","none",...ke()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...ke()]}],h:[{h:["screen","lh",...ke()]}],"min-h":[{"min-h":["screen","lh","none",...ke()]}],"max-h":[{"max-h":["screen","lh",...ke()]}],"font-size":[{text:["base",s,Oo,Ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Zx,Qx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qu,re]}],"font-family":[{font:[Xx,Kx,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,se,re]}],"line-clamp":[{"line-clamp":[be,"none",se,Sp]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",se,Ar]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[be,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},rr,se,re],radial:["",se,re],conic:[rr,se,re]},Jx,Gx]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,se,re]}],"outline-w":[{outline:["",be,Oo,Ar]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",g,ga,ya]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",v,ga,ya]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[be,Ar]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",_,ga,ya]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[be,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:et()}],brightness:[{brightness:[be,se,re]}],contrast:[{contrast:[be,se,re]}],"drop-shadow":[{"drop-shadow":["","none",N,ga,ya]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",be,se,re]}],"hue-rotate":[{"hue-rotate":[be,se,re]}],invert:[{invert:["",be,se,re]}],saturate:[{saturate:[be,se,re]}],sepia:[{sepia:["",be,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[be,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[be,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,se,re]}],"backdrop-invert":[{"backdrop-invert":["",be,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[be,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[be,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",be,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",se,re]}],ease:[{ease:["linear","initial",E,se,re]}],delay:[{delay:[be,se,re]}],animate:[{animate:["none",F,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,se,re]}],"perspective-origin":[{"perspective-origin":W()}],rotate:[{rotate:jt()}],"rotate-x":[{"rotate-x":jt()}],"rotate-y":[{"rotate-y":jt()}],"rotate-z":[{"rotate-z":jt()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:W()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Mt()}],"translate-x":[{"translate-x":Mt()}],"translate-y":[{"translate-y":Mt()}],"translate-z":[{"translate-z":Mt()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[be,Oo,Ar,Sp]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},nE=Fx(tE);function Bs(...r){return nE(gy(r))}const rE=ix,Ly=R.forwardRef(({className:r,...t},s)=>S.jsx(cy,{ref:s,className:Bs("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...t}));Ly.displayName=cy.displayName;const sE=ax("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Fy=R.forwardRef(({className:r,variant:t,...s},o)=>S.jsx(dy,{ref:o,className:Bs(sE({variant:t}),r),...s}));Fy.displayName=dy.displayName;const oE=R.forwardRef(({className:r,...t},s)=>S.jsx(py,{ref:s,className:Bs("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...t}));oE.displayName=py.displayName;const Dy=R.forwardRef(({className:r,...t},s)=>S.jsx(my,{ref:s,className:Bs("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...t,children:S.jsx(hx,{className:"h-4 w-4"})}));Dy.displayName=my.displayName;const Iy=R.forwardRef(({className:r,...t},s)=>S.jsx(fy,{ref:s,className:Bs("text-sm font-semibold",r),...t}));Iy.displayName=fy.displayName;const jy=R.forwardRef(({className:r,...t},s)=>S.jsx(hy,{ref:s,className:Bs("text-sm opacity-90",r),...t}));jy.displayName=hy.displayName;function iE(){const{toasts:r}=l0();return S.jsxs(rE,{children:[r.map(function({id:t,title:s,description:o,action:l,...u}){return S.jsxs(Fy,{...u,children:[S.jsxs("div",{className:"grid gap-1",children:[s&&S.jsx(Iy,{children:s}),o&&S.jsx(jy,{children:o})]}),l,S.jsx(Dy,{})]},t)}),S.jsx(Ly,{})]})}var Jo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aE={setTimeout:(r,t)=>setTimeout(r,t),clearTimeout:r=>clearTimeout(r),setInterval:(r,t)=>setInterval(r,t),clearInterval:r=>clearInterval(r)},ir,Dc,Om,lE=(Om=class{constructor(){pe(this,ir,aE);pe(this,Dc,!1)}setTimeoutProvider(r){ee(this,ir,r)}setTimeout(r,t){return C(this,ir).setTimeout(r,t)}clearTimeout(r){C(this,ir).clearTimeout(r)}setInterval(r,t){return C(this,ir).setInterval(r,t)}clearInterval(r){C(this,ir).clearInterval(r)}},ir=new WeakMap,Dc=new WeakMap,Om),Fr=new lE;function uE(r){setTimeout(r,0)}var Gr=typeof window>"u"||"Deno"in globalThis;function Pt(){}function cE(r,t){return typeof r=="function"?r(t):r}function lc(r){return typeof r=="number"&&r>=0&&r!==1/0}function My(r,t){return Math.max(r+(t||0)-Date.now(),0)}function mr(r,t){return typeof r=="function"?r(t):r}function Qt(r,t){return typeof r=="function"?r(t):r}function bp(r,t){const{type:s="all",exact:o,fetchStatus:l,predicate:u,queryKey:d,stale:h}=r;if(d){if(o){if(t.queryHash!==qc(d,t.options))return!1}else if(!Vo(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||l&&l!==t.state.fetchStatus||u&&!u(t))}function Cp(r,t){const{exact:s,status:o,predicate:l,mutationKey:u}=r;if(u){if(!t.options.mutationKey)return!1;if(s){if(Wo(t.options.mutationKey)!==Wo(u))return!1}else if(!Vo(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||l&&!l(t))}function qc(r,t){return((t==null?void 0:t.queryKeyHashFn)||Wo)(r)}function Wo(r){return JSON.stringify(r,(t,s)=>cc(s)?Object.keys(s).sort().reduce((o,l)=>(o[l]=s[l],o),{}):s)}function Vo(r,t){return r===t?!0:typeof r!=typeof t?!1:r&&t&&typeof r=="object"&&typeof t=="object"?Object.keys(t).every(s=>Vo(r[s],t[s])):!1}var dE=Object.prototype.hasOwnProperty;function Uy(r,t,s=0){if(r===t)return r;if(s>500)return t;const o=Rp(r)&&Rp(t);if(!o&&!(cc(r)&&cc(t)))return t;const u=(o?r:Object.keys(r)).length,d=o?t:Object.keys(t),h=d.length,p=o?new Array(h):{};let m=0;for(let g=0;g{Fr.setTimeout(t,r)})}function dc(r,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(r,t):s.structuralSharing!==!1?Uy(r,t):t}function hE(r,t,s=0){const o=[...r,t];return s&&o.length>s?o.slice(1):o}function pE(r,t,s=0){const o=[t,...r];return s&&o.length>s?o.slice(0,-1):o}var Qc=Symbol();function By(r,t){return!r.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!r.queryFn||r.queryFn===Qc?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function zy(r,t){return typeof r=="function"?r(...t):!!r}function mE(r,t,s){let o=!1,l;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(l??(l=t()),o||(o=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),r}var Ir,ar,Cs,Am,yE=(Am=class extends Jo{constructor(){super();pe(this,Ir);pe(this,ar);pe(this,Cs);ee(this,Cs,t=>{if(!Gr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){C(this,ar)||this.setEventListener(C(this,Cs))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,ar))==null||t.call(this),ee(this,ar,void 0))}setEventListener(t){var s;ee(this,Cs,t),(s=C(this,ar))==null||s.call(this),ee(this,ar,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){C(this,Ir)!==t&&(ee(this,Ir,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof C(this,Ir)=="boolean"?C(this,Ir):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ir=new WeakMap,ar=new WeakMap,Cs=new WeakMap,Am),Kc=new yE;function fc(){let r,t;const s=new Promise((l,u)=>{r=l,t=u});s.status="pending",s.catch(()=>{});function o(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{o({status:"fulfilled",value:l}),r(l)},s.reject=l=>{o({status:"rejected",reason:l}),t(l)},s}var gE=uE;function vE(){let r=[],t=0,s=h=>{h()},o=h=>{h()},l=gE;const u=h=>{t?r.push(h):l(()=>{s(h)})},d=()=>{const h=r;r=[],h.length&&l(()=>{o(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{l=h}}}var ct=vE(),Rs,lr,Ts,Nm,wE=(Nm=class extends Jo{constructor(){super();pe(this,Rs,!0);pe(this,lr);pe(this,Ts);ee(this,Ts,t=>{if(!Gr&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){C(this,lr)||this.setEventListener(C(this,Ts))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,lr))==null||t.call(this),ee(this,lr,void 0))}setEventListener(t){var s;ee(this,Ts,t),(s=C(this,lr))==null||s.call(this),ee(this,lr,t(this.setOnline.bind(this)))}setOnline(t){C(this,Rs)!==t&&(ee(this,Rs,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return C(this,Rs)}},Rs=new WeakMap,lr=new WeakMap,Ts=new WeakMap,Nm),La=new wE;function xE(r){return Math.min(1e3*2**r,3e4)}function $y(r){return(r??"online")==="online"?La.isOnline():!0}var hc=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function Wy(r){let t=!1,s=0,o;const l=fc(),u=()=>l.status!=="pending",d=k=>{var w;if(!u()){const E=new hc(k);_(E),(w=r.onCancel)==null||w.call(r,E)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>Kc.isFocused()&&(r.networkMode==="always"||La.isOnline())&&r.canRun(),g=()=>$y(r.networkMode)&&r.canRun(),v=k=>{u()||(o==null||o(),l.resolve(k))},_=k=>{u()||(o==null||o(),l.reject(k))},N=()=>new Promise(k=>{var w;o=E=>{(u()||m())&&k(E)},(w=r.onPause)==null||w.call(r)}).then(()=>{var k;o=void 0,u()||(k=r.onContinue)==null||k.call(r)}),j=()=>{if(u())return;let k;const w=s===0?r.initialPromise:void 0;try{k=w??r.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(v).catch(E=>{var $;if(u())return;const F=r.retry??(Gr?0:3),A=r.retryDelay??xE,L=typeof A=="function"?A(s,E):A,W=F===!0||typeof F=="number"&&sm()?void 0:N()).then(()=>{t?_(E):j()})})};return{promise:l,status:()=>l.status,cancel:d,continue:()=>(o==null||o(),l),cancelRetry:h,continueRetry:p,canStart:g,start:()=>(g()?j():N().then(j),l)}}var jr,Lm,Vy=(Lm=class{constructor(){pe(this,jr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lc(this.gcTime)&&ee(this,jr,Fr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Gr?1/0:300*1e3))}clearGcTimeout(){C(this,jr)&&(Fr.clearTimeout(C(this,jr)),ee(this,jr,void 0))}},jr=new WeakMap,Lm),Mr,Ps,qt,Ur,st,qo,Br,on,An,Fm,EE=(Fm=class extends Vy{constructor(t){super();pe(this,on);pe(this,Mr);pe(this,Ps);pe(this,qt);pe(this,Ur);pe(this,st);pe(this,qo);pe(this,Br);ee(this,Br,!1),ee(this,qo,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Ur,t.client),ee(this,qt,C(this,Ur).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Mr,Op(this.options)),this.state=t.state??C(this,Mr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,st))==null?void 0:t.promise}setOptions(t){if(this.options={...C(this,qo),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Op(this.options);s.data!==void 0&&(this.setState(Pp(s.data,s.dataUpdatedAt)),ee(this,Mr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,qt).remove(this)}setData(t,s){const o=dc(this.state.data,t,this.options);return Pe(this,on,An).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Pe(this,on,An).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,l;const s=(o=C(this,st))==null?void 0:o.promise;return(l=C(this,st))==null||l.cancel(t),s?s.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Mr))}isActive(){return this.observers.some(t=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>mr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!My(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=C(this,st))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=C(this,st))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,qt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(C(this,st)&&(C(this,Br)?C(this,st).cancel({revert:!0}):C(this,st).cancelRetry()),this.scheduleGc()),C(this,qt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,on,An).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,g,v,_,N,j,k,w,E,F,A;if(this.state.fetchStatus!=="idle"&&((p=C(this,st))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(C(this,st))return C(this,st).continueRetry(),C(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const L=this.observers.find(W=>W.options.queryFn);L&&this.setOptions(L.options)}const o=new AbortController,l=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(ee(this,Br,!0),o.signal)})},u=()=>{const L=By(this.options,s),$=(()=>{const G={client:C(this,Ur),queryKey:this.queryKey,meta:this.meta};return l(G),G})();return ee(this,Br,!1),this.options.persister?this.options.persister(L,$,this):L($)},h=(()=>{const L={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:C(this,Ur),state:this.state,fetchFn:u};return l(L),L})();(m=this.options.behavior)==null||m.onFetch(h,this),ee(this,Ps,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=h.fetchOptions)==null?void 0:g.meta))&&Pe(this,on,An).call(this,{type:"fetch",meta:(v=h.fetchOptions)==null?void 0:v.meta}),ee(this,st,Wy({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:L=>{L instanceof hc&&L.revert&&this.setState({...C(this,Ps),fetchStatus:"idle"}),o.abort()},onFail:(L,W)=>{Pe(this,on,An).call(this,{type:"failed",failureCount:L,error:W})},onPause:()=>{Pe(this,on,An).call(this,{type:"pause"})},onContinue:()=>{Pe(this,on,An).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const L=await C(this,st).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(N=(_=C(this,qt).config).onSuccess)==null||N.call(_,L,this),(k=(j=C(this,qt).config).onSettled)==null||k.call(j,L,this.state.error,this),L}catch(L){if(L instanceof hc){if(L.silent)return C(this,st).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw Pe(this,on,An).call(this,{type:"error",error:L}),(E=(w=C(this,qt).config).onError)==null||E.call(w,L,this),(A=(F=C(this,qt).config).onSettled)==null||A.call(F,this.state.data,L,this),L}finally{this.scheduleGc()}}},Mr=new WeakMap,Ps=new WeakMap,qt=new WeakMap,Ur=new WeakMap,st=new WeakMap,qo=new WeakMap,Br=new WeakMap,on=new WeakSet,An=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Hy(o.data,this.options),fetchMeta:t.meta??null};case"success":const l={...o,...Pp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Ps,t.manual?l:void 0),l;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),ct.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),C(this,qt).notify({query:this,type:"updated",action:t})})},Fm);function Hy(r,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$y(t.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Pp(r,t){return{data:r,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Op(r){const t=typeof r.initialData=="function"?r.initialData():r.initialData,s=t!==void 0,o=s?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Tt,Oe,Qo,Et,zr,Os,Nn,ur,Ko,As,Ns,$r,Wr,cr,Ls,De,Fo,pc,mc,yc,gc,vc,wc,xc,qy,Dm,SE=(Dm=class extends Jo{constructor(t,s){super();pe(this,De);pe(this,Tt);pe(this,Oe);pe(this,Qo);pe(this,Et);pe(this,zr);pe(this,Os);pe(this,Nn);pe(this,ur);pe(this,Ko);pe(this,As);pe(this,Ns);pe(this,$r);pe(this,Wr);pe(this,cr);pe(this,Ls,new Set);this.options=s,ee(this,Tt,t),ee(this,ur,null),ee(this,Nn,fc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,Oe).addObserver(this),Ap(C(this,Oe),this.options)?Pe(this,De,Fo).call(this):this.updateResult(),Pe(this,De,gc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ec(C(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ec(C(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,De,vc).call(this),Pe(this,De,wc).call(this),C(this,Oe).removeObserver(this)}setOptions(t){const s=this.options,o=C(this,Oe);if(this.options=C(this,Tt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,C(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,De,xc).call(this),C(this,Oe).setOptions(this.options),s._defaulted&&!uc(this.options,s)&&C(this,Tt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,Oe),observer:this});const l=this.hasListeners();l&&Np(C(this,Oe),o,this.options,s)&&Pe(this,De,Fo).call(this),this.updateResult(),l&&(C(this,Oe)!==o||Qt(this.options.enabled,C(this,Oe))!==Qt(s.enabled,C(this,Oe))||mr(this.options.staleTime,C(this,Oe))!==mr(s.staleTime,C(this,Oe)))&&Pe(this,De,pc).call(this);const u=Pe(this,De,mc).call(this);l&&(C(this,Oe)!==o||Qt(this.options.enabled,C(this,Oe))!==Qt(s.enabled,C(this,Oe))||u!==C(this,cr))&&Pe(this,De,yc).call(this,u)}getOptimisticResult(t){const s=C(this,Tt).getQueryCache().build(C(this,Tt),t),o=this.createResult(s,t);return kE(this,o)&&(ee(this,Et,o),ee(this,Os,this.options),ee(this,zr,C(this,Oe).state)),o}getCurrentResult(){return C(this,Et)}trackResult(t,s){return new Proxy(t,{get:(o,l)=>(this.trackProp(l),s==null||s(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,Nn).status==="pending"&&C(this,Nn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,l))})}trackProp(t){C(this,Ls).add(t)}getCurrentQuery(){return C(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=C(this,Tt).defaultQueryOptions(t),o=C(this,Tt).getQueryCache().build(C(this,Tt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Pe(this,De,Fo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Et)))}createResult(t,s){var ie;const o=C(this,Oe),l=this.options,u=C(this,Et),d=C(this,zr),h=C(this,Os),m=t!==o?t.state:C(this,Qo),{state:g}=t;let v={...g},_=!1,N;if(s._optimisticResults){const ue=this.hasListeners(),Ee=!ue&&Ap(t,s),Te=ue&&Np(t,o,s,l);(Ee||Te)&&(v={...v,...Hy(g.data,t.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:w}=v;N=v.data;let E=!1;if(s.placeholderData!==void 0&&N===void 0&&w==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,E=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=C(this,Ns))==null?void 0:ie.state.data,C(this,Ns)):s.placeholderData,ue!==void 0&&(w="success",N=dc(u==null?void 0:u.data,ue,s),_=!0)}if(s.select&&N!==void 0&&!E)if(u&&N===(d==null?void 0:d.data)&&s.select===C(this,Ko))N=C(this,As);else try{ee(this,Ko,s.select),N=s.select(N),N=dc(u==null?void 0:u.data,N,s),ee(this,As,N),ee(this,ur,null)}catch(ue){ee(this,ur,ue)}C(this,ur)&&(j=C(this,ur),N=C(this,As),k=Date.now(),w="error");const F=v.fetchStatus==="fetching",A=w==="pending",L=w==="error",W=A&&F,$=N!==void 0,z={status:w,fetchStatus:v.fetchStatus,isPending:A,isSuccess:w==="success",isError:L,isInitialLoading:W,isLoading:W,data:N,dataUpdatedAt:v.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:F,isRefetching:F&&!A,isLoadingError:L&&!$,isPaused:v.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:L&&$,isStale:Gc(t,s),refetch:this.refetch,promise:C(this,Nn),isEnabled:Qt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=z.data!==void 0,Ee=z.status==="error"&&!ue,Te=_e=>{Ee?_e.reject(z.error):ue&&_e.resolve(z.data)},xe=()=>{const _e=ee(this,Nn,z.promise=fc());Te(_e)},J=C(this,Nn);switch(J.status){case"pending":t.queryHash===o.queryHash&&Te(J);break;case"fulfilled":(Ee||z.data!==J.value)&&xe();break;case"rejected":(!Ee||z.error!==J.reason)&&xe();break}}return z}updateResult(){const t=C(this,Et),s=this.createResult(C(this,Oe),this.options);if(ee(this,zr,C(this,Oe).state),ee(this,Os,this.options),C(this,zr).data!==void 0&&ee(this,Ns,C(this,Oe)),uc(s,t))return;ee(this,Et,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!C(this,Ls).size)return!0;const d=new Set(u??C(this,Ls));return this.options.throwOnError&&d.add("error"),Object.keys(C(this,Et)).some(h=>{const p=h;return C(this,Et)[p]!==t[p]&&d.has(p)})};Pe(this,De,qy).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,De,gc).call(this)}},Tt=new WeakMap,Oe=new WeakMap,Qo=new WeakMap,Et=new WeakMap,zr=new WeakMap,Os=new WeakMap,Nn=new WeakMap,ur=new WeakMap,Ko=new WeakMap,As=new WeakMap,Ns=new WeakMap,$r=new WeakMap,Wr=new WeakMap,cr=new WeakMap,Ls=new WeakMap,De=new WeakSet,Fo=function(t){Pe(this,De,xc).call(this);let s=C(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Pt)),s},pc=function(){Pe(this,De,vc).call(this);const t=mr(this.options.staleTime,C(this,Oe));if(Gr||C(this,Et).isStale||!lc(t))return;const o=My(C(this,Et).dataUpdatedAt,t)+1;ee(this,$r,Fr.setTimeout(()=>{C(this,Et).isStale||this.updateResult()},o))},mc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,Oe)):this.options.refetchInterval)??!1},yc=function(t){Pe(this,De,wc).call(this),ee(this,cr,t),!(Gr||Qt(this.options.enabled,C(this,Oe))===!1||!lc(C(this,cr))||C(this,cr)===0)&&ee(this,Wr,Fr.setInterval(()=>{(this.options.refetchIntervalInBackground||Kc.isFocused())&&Pe(this,De,Fo).call(this)},C(this,cr)))},gc=function(){Pe(this,De,pc).call(this),Pe(this,De,yc).call(this,Pe(this,De,mc).call(this))},vc=function(){C(this,$r)&&(Fr.clearTimeout(C(this,$r)),ee(this,$r,void 0))},wc=function(){C(this,Wr)&&(Fr.clearInterval(C(this,Wr)),ee(this,Wr,void 0))},xc=function(){const t=C(this,Tt).getQueryCache().build(C(this,Tt),this.options);if(t===C(this,Oe))return;const s=C(this,Oe);ee(this,Oe,t),ee(this,Qo,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},qy=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(C(this,Et))}),C(this,Tt).getQueryCache().notify({query:C(this,Oe),type:"observerResultsUpdated"})})},Dm);function _E(r,t){return Qt(t.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&t.retryOnMount===!1)}function Ap(r,t){return _E(r,t)||r.state.data!==void 0&&Ec(r,t,t.refetchOnMount)}function Ec(r,t,s){if(Qt(t.enabled,r)!==!1&&mr(t.staleTime,r)!=="static"){const o=typeof s=="function"?s(r):s;return o==="always"||o!==!1&&Gc(r,t)}return!1}function Np(r,t,s,o){return(r!==t||Qt(o.enabled,r)===!1)&&(!s.suspense||r.state.status!=="error")&&Gc(r,s)}function Gc(r,t){return Qt(t.enabled,r)!==!1&&r.isStaleByTime(mr(t.staleTime,r))}function kE(r,t){return!uc(r.getCurrentResult(),t)}function Lp(r){return{onFetch:(t,s)=>{var g,v,_,N,j;const o=t.options,l=(_=(v=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:_.direction,u=((N=t.state.data)==null?void 0:N.pages)||[],d=((j=t.state.data)==null?void 0:j.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let k=!1;const w=A=>{mE(A,()=>t.signal,()=>k=!0)},E=By(t.options,t.fetchOptions),F=async(A,L,W)=>{if(k)return Promise.reject();if(L==null&&A.pages.length)return Promise.resolve(A);const G=(()=>{const Ee={client:t.client,queryKey:t.queryKey,pageParam:L,direction:W?"backward":"forward",meta:t.options.meta};return w(Ee),Ee})(),z=await E(G),{maxPages:ie}=t.options,ue=W?pE:hE;return{pages:ue(A.pages,z,ie),pageParams:ue(A.pageParams,L,ie)}};if(l&&u.length){const A=l==="backward",L=A?bE:Fp,W={pages:u,pageParams:d},$=L(o,W);h=await F(W,$,A)}else{const A=r??u.length;do{const L=p===0?d[0]??o.initialPageParam:Fp(o,h);if(p>0&&L==null)break;h=await F(h,L),p++}while(p{var k,w;return(w=(k=t.options).persister)==null?void 0:w.call(k,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function Fp(r,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?r.getNextPageParam(t[o],t,s[o],s):void 0}function bE(r,{pages:t,pageParams:s}){var o;return t.length>0?(o=r.getPreviousPageParam)==null?void 0:o.call(r,t[0],t,s[0],s):void 0}var Go,mn,gt,Vr,yn,or,Im,CE=(Im=class extends Vy{constructor(t){super();pe(this,yn);pe(this,Go);pe(this,mn);pe(this,gt);pe(this,Vr);ee(this,Go,t.client),this.mutationId=t.mutationId,ee(this,gt,t.mutationCache),ee(this,mn,[]),this.state=t.state||RE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,mn).includes(t)||(C(this,mn).push(t),this.clearGcTimeout(),C(this,gt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,mn,C(this,mn).filter(s=>s!==t)),this.scheduleGc(),C(this,gt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,mn).length||(this.state.status==="pending"?this.scheduleGc():C(this,gt).remove(this))}continue(){var t;return((t=C(this,Vr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,m,g,v,_,N,j,k,w,E,F,A,L,W,$,G;const s=()=>{Pe(this,yn,or).call(this,{type:"continue"})},o={client:C(this,Go),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Vr,Wy({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(z,ie)=>{Pe(this,yn,or).call(this,{type:"failed",failureCount:z,error:ie})},onPause:()=>{Pe(this,yn,or).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,gt).canRun(this)}));const l=this.state.status==="pending",u=!C(this,Vr).canStart();try{if(l)s();else{Pe(this,yn,or).call(this,{type:"pending",variables:t,isPaused:u}),C(this,gt).config.onMutate&&await C(this,gt).config.onMutate(t,this,o);const ie=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,o));ie!==this.state.context&&Pe(this,yn,or).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const z=await C(this,Vr).start();return await((m=(p=C(this,gt).config).onSuccess)==null?void 0:m.call(p,z,t,this.state.context,this,o)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,z,t,this.state.context,o)),await((N=(_=C(this,gt).config).onSettled)==null?void 0:N.call(_,z,null,this.state.variables,this.state.context,this,o)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,z,null,t,this.state.context,o)),Pe(this,yn,or).call(this,{type:"success",data:z}),z}catch(z){try{await((E=(w=C(this,gt).config).onError)==null?void 0:E.call(w,z,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((A=(F=this.options).onError)==null?void 0:A.call(F,z,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await((W=(L=C(this,gt).config).onSettled)==null?void 0:W.call(L,void 0,z,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,z,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Pe(this,yn,or).call(this,{type:"error",error:z}),z}finally{C(this,gt).runNext(this)}}},Go=new WeakMap,mn=new WeakMap,gt=new WeakMap,Vr=new WeakMap,yn=new WeakSet,or=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ct.batch(()=>{C(this,mn).forEach(o=>{o.onMutationUpdate(t)}),C(this,gt).notify({mutation:this,type:"updated",action:t})})},Im);function RE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ln,an,Xo,jm,TE=(jm=class extends Jo{constructor(t={}){super();pe(this,Ln);pe(this,an);pe(this,Xo);this.config=t,ee(this,Ln,new Set),ee(this,an,new Map),ee(this,Xo,0)}build(t,s,o){const l=new CE({client:t,mutationCache:this,mutationId:++fa(this,Xo)._,options:t.defaultMutationOptions(s),state:o});return this.add(l),l}add(t){C(this,Ln).add(t);const s=va(t);if(typeof s=="string"){const o=C(this,an).get(s);o?o.push(t):C(this,an).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,Ln).delete(t)){const s=va(t);if(typeof s=="string"){const o=C(this,an).get(s);if(o)if(o.length>1){const l=o.indexOf(t);l!==-1&&o.splice(l,1)}else o[0]===t&&C(this,an).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=va(t);if(typeof s=="string"){const o=C(this,an).get(s),l=o==null?void 0:o.find(u=>u.state.status==="pending");return!l||l===t}else return!0}runNext(t){var o;const s=va(t);if(typeof s=="string"){const l=(o=C(this,an).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{C(this,Ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,Ln).clear(),C(this,an).clear()})}getAll(){return Array.from(C(this,Ln))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Cp(s,o))}findAll(t={}){return this.getAll().filter(s=>Cp(t,s))}notify(t){ct.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ct.batch(()=>Promise.all(t.map(s=>s.continue().catch(Pt))))}},Ln=new WeakMap,an=new WeakMap,Xo=new WeakMap,jm);function va(r){var t;return(t=r.options.scope)==null?void 0:t.id}var gn,Mm,PE=(Mm=class extends Jo{constructor(t={}){super();pe(this,gn);this.config=t,ee(this,gn,new Map)}build(t,s,o){const l=s.queryKey,u=s.queryHash??qc(l,s);let d=this.get(u);return d||(d=new EE({client:t,queryKey:l,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(l)}),this.add(d)),d}add(t){C(this,gn).has(t.queryHash)||(C(this,gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=C(this,gn).get(t.queryHash);s&&(t.destroy(),s===t&&C(this,gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,gn).get(t)}getAll(){return[...C(this,gn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>bp(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>bp(t,o)):s}notify(t){ct.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gn=new WeakMap,Mm),He,dr,fr,Fs,Ds,hr,Is,js,Um,OE=(Um=class{constructor(r={}){pe(this,He);pe(this,dr);pe(this,fr);pe(this,Fs);pe(this,Ds);pe(this,hr);pe(this,Is);pe(this,js);ee(this,He,r.queryCache||new PE),ee(this,dr,r.mutationCache||new TE),ee(this,fr,r.defaultOptions||{}),ee(this,Fs,new Map),ee(this,Ds,new Map),ee(this,hr,0)}mount(){fa(this,hr)._++,C(this,hr)===1&&(ee(this,Is,Kc.subscribe(async r=>{r&&(await this.resumePausedMutations(),C(this,He).onFocus())})),ee(this,js,La.subscribe(async r=>{r&&(await this.resumePausedMutations(),C(this,He).onOnline())})))}unmount(){var r,t;fa(this,hr)._--,C(this,hr)===0&&((r=C(this,Is))==null||r.call(this),ee(this,Is,void 0),(t=C(this,js))==null||t.call(this),ee(this,js,void 0))}isFetching(r){return C(this,He).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return C(this,dr).findAll({...r,status:"pending"}).length}getQueryData(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=C(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(r){const t=this.defaultQueryOptions(r),s=C(this,He).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(r):(r.revalidateIfStale&&s.isStaleByTime(mr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(r){return C(this,He).findAll(r).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(r,t,s){const o=this.defaultQueryOptions({queryKey:r}),l=C(this,He).get(o.queryHash),u=l==null?void 0:l.state.data,d=cE(t,u);if(d!==void 0)return C(this,He).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(r,t,s){return ct.batch(()=>C(this,He).findAll(r).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=C(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(r){const t=C(this,He);ct.batch(()=>{t.findAll(r).forEach(s=>{t.remove(s)})})}resetQueries(r,t){const s=C(this,He);return ct.batch(()=>(s.findAll(r).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...r},t)))}cancelQueries(r,t={}){const s={revert:!0,...t},o=ct.batch(()=>C(this,He).findAll(r).map(l=>l.cancel(s)));return Promise.all(o).then(Pt).catch(Pt)}invalidateQueries(r,t={}){return ct.batch(()=>(C(this,He).findAll(r).forEach(s=>{s.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},t)))}refetchQueries(r,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=ct.batch(()=>C(this,He).findAll(r).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(Pt)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Pt)}fetchQuery(r){const t=this.defaultQueryOptions(r);t.retry===void 0&&(t.retry=!1);const s=C(this,He).build(this,t);return s.isStaleByTime(mr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Pt).catch(Pt)}fetchInfiniteQuery(r){return r.behavior=Lp(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Pt).catch(Pt)}ensureInfiniteQueryData(r){return r.behavior=Lp(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return La.isOnline()?C(this,dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,He)}getMutationCache(){return C(this,dr)}getDefaultOptions(){return C(this,fr)}setDefaultOptions(r){ee(this,fr,r)}setQueryDefaults(r,t){C(this,Fs).set(Wo(r),{queryKey:r,defaultOptions:t})}getQueryDefaults(r){const t=[...C(this,Fs).values()],s={};return t.forEach(o=>{Vo(r,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(r,t){C(this,Ds).set(Wo(r),{mutationKey:r,defaultOptions:t})}getMutationDefaults(r){const t=[...C(this,Ds).values()],s={};return t.forEach(o=>{Vo(r,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(r){if(r._defaulted)return r;const t={...C(this,fr).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return t.queryHash||(t.queryHash=qc(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Qc&&(t.enabled=!1),t}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...C(this,fr).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){C(this,He).clear(),C(this,dr).clear()}},He=new WeakMap,dr=new WeakMap,fr=new WeakMap,Fs=new WeakMap,Ds=new WeakMap,hr=new WeakMap,Is=new WeakMap,js=new WeakMap,Um),Qy=R.createContext(void 0),AE=r=>{const t=R.useContext(Qy);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},NE=({client:r,children:t})=>(R.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),S.jsx(Qy.Provider,{value:r,children:t})),Ky=R.createContext(!1),LE=()=>R.useContext(Ky);Ky.Provider;function FE(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var DE=R.createContext(FE()),IE=()=>R.useContext(DE),jE=(r,t,s)=>{const o=s!=null&&s.state.error&&typeof r.throwOnError=="function"?zy(r.throwOnError,[s.state.error,s]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||o)&&(t.isReset()||(r.retryOnMount=!1))},ME=r=>{R.useEffect(()=>{r.clearReset()},[r])},UE=({result:r,errorResetBoundary:t,throwOnError:s,query:o,suspense:l})=>r.isError&&!t.isReset()&&!r.isFetching&&o&&(l&&r.data===void 0||zy(s,[r.error,o])),BE=r=>{if(r.suspense){const s=l=>l==="static"?l:Math.max(l??1e3,1e3),o=r.staleTime;r.staleTime=typeof o=="function"?(...l)=>s(o(...l)):s(o),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},zE=(r,t)=>r.isLoading&&r.isFetching&&!t,$E=(r,t)=>(r==null?void 0:r.suspense)&&t.isPending,Dp=(r,t,s)=>t.fetchOptimistic(r).catch(()=>{s.clearReset()});function WE(r,t,s){var _,N,j,k;const o=LE(),l=IE(),u=AE(),d=u.defaultQueryOptions(r);(N=(_=u.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||N.call(_,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",BE(d),jE(d,l,h),ME(l);const p=!u.getQueryCache().get(d.queryHash),[m]=R.useState(()=>new t(u,d)),g=m.getOptimisticResult(d),v=!o&&r.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(w=>{const E=v?m.subscribe(ct.batchCalls(w)):Pt;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),R.useEffect(()=>{m.setOptions(d)},[d,m]),$E(d,g))throw Dp(d,m,l);if(UE({result:g,errorResetBoundary:l,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw g.error;if((k=(j=u.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||k.call(j,d,g),d.experimental_prefetchInRender&&!Gr&&zE(g,o)){const w=p?Dp(d,m,l):h==null?void 0:h.promise;w==null||w.catch(Pt).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?g:m.trackResult(g)}function VE(r,t){return WE(r,SE)}const HE=new OE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Fa(){return Fa=Object.assign?Object.assign.bind():function(r){for(var t=1;t"u")throw new Error(t)}function Gy(r,t){if(!r){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QE(){return Math.random().toString(36).substr(2,8)}function jp(r,t){return{usr:r.state,key:r.key,idx:t}}function Sc(r,t,s,o){return s===void 0&&(s=null),Fa({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof t=="string"?za(t):t,{state:s,key:t&&t.key||o||QE()})}function Xy(r){let{pathname:t="/",search:s="",hash:o=""}=r;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function za(r){let t={};if(r){let s=r.indexOf("#");s>=0&&(t.hash=r.substr(s),r=r.substr(0,s));let o=r.indexOf("?");o>=0&&(t.search=r.substr(o),r=r.substr(0,o)),r&&(t.pathname=r)}return t}function KE(r,t,s,o){o===void 0&&(o={});let{window:l=document.defaultView,v5Compat:u=!1}=o,d=l.history,h=pr.Pop,p=null,m=g();m==null&&(m=0,d.replaceState(Fa({},d.state,{idx:m}),""));function g(){return(d.state||{idx:null}).idx}function v(){h=pr.Pop;let w=g(),E=w==null?null:w-m;m=w,p&&p({action:h,location:k.location,delta:E})}function _(w,E){h=pr.Push;let F=Sc(k.location,w,E);m=g()+1;let A=jp(F,m),L=k.createHref(F);try{d.pushState(A,"",L)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;l.location.assign(L)}u&&p&&p({action:h,location:k.location,delta:1})}function N(w,E){h=pr.Replace;let F=Sc(k.location,w,E);m=g();let A=jp(F,m),L=k.createHref(F);d.replaceState(A,"",L),u&&p&&p({action:h,location:k.location,delta:0})}function j(w){let E=l.location.origin!=="null"?l.location.origin:l.location.href,F=typeof w=="string"?w:Xy(w);return F=F.replace(/ $/,"%20"),At(E,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,E)}let k={get action(){return h},get location(){return r(l,d)},listen(w){if(p)throw new Error("A history only accepts one active listener");return l.addEventListener(Ip,v),p=w,()=>{l.removeEventListener(Ip,v),p=null}},createHref(w){return t(l,w)},createURL:j,encodeLocation(w){let E=j(w);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:_,replace:N,go(w){return d.go(w)}};return k}var Mp;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Mp||(Mp={}));function GE(r,t,s){return s===void 0&&(s="/"),XE(r,t,s)}function XE(r,t,s,o){let l=typeof t=="string"?za(t):t,u=Zy(l.pathname||"/",s);if(u==null)return null;let d=Yy(r);YE(d);let h=null,p=uS(u);for(let m=0;h==null&&m{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(At(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let m=bs([o,p.relativePath]),g=s.concat(p);u.children&&u.children.length>0&&(At(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),Yy(u.children,t,g,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:sS(m,u.index),routesMeta:g})};return r.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))l(u,d);else for(let p of Jy(u.path))l(u,d,p)}),t}function Jy(r){let t=r.split("/");if(t.length===0)return[];let[s,...o]=t,l=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return l?[u,""]:[u];let d=Jy(o.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),l&&h.push(...d),h.map(p=>r.startsWith("/")&&p===""?"/":p)}function YE(r){r.sort((t,s)=>t.score!==s.score?s.score-t.score:oS(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const JE=/^:[\w-]+$/,ZE=3,eS=2,tS=1,nS=10,rS=-2,Up=r=>r==="*";function sS(r,t){let s=r.split("/"),o=s.length;return s.some(Up)&&(o+=rS),t&&(o+=eS),s.filter(l=>!Up(l)).reduce((l,u)=>l+(JE.test(u)?ZE:u===""?tS:nS),o)}function oS(r,t){return r.length===t.length&&r.slice(0,-1).every((o,l)=>o===t[l])?r[r.length-1]-t[t.length-1]:0}function iS(r,t,s){let{routesMeta:o}=r,l={},u="/",d=[];for(let h=0;h{let{paramName:_,isOptional:N}=g;if(_==="*"){let k=h[v]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const j=h[v];return N&&!j?m[_]=void 0:m[_]=(j||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:r}}function lS(r,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),Gy(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let o=[],l="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(o.push({paramName:"*"}),l+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?l+="\\/*$":r!==""&&r!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),o]}function uS(r){try{return r.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Gy(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),r}}function Zy(r,t){if(t==="/")return r;if(!r.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=r.charAt(s);return o&&o!=="/"?null:r.slice(s)||"/"}const cS=r=>r.replace(/\/\/+/g,"/"),bs=r=>cS(r.join("/")),dS=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/");function fS(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const eg=["post","put","patch","delete"];new Set(eg);const hS=["get",...eg];new Set(hS);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Da(){return Da=Object.assign?Object.assign.bind():function(r){for(var t=1;tObject.assign({},w,{params:Object.assign({},h,w.params),pathname:bs([p,l.encodeLocation?l.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?p:bs([p,l.encodeLocation?l.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),u,s,o);return t&&k?R.createElement(Zo.Provider,{value:{location:Da({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:pr.Pop}},k):k}function wS(){let r=RS(),t=fS(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),s=r instanceof Error?r.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),s?R.createElement("pre",{style:l},s):null,null)}const xS=R.createElement(wS,null);class ES extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?R.createElement($a.Provider,{value:this.props.routeContext},R.createElement(ng.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function SS(r){let{routeContext:t,match:s,children:o}=r,l=R.useContext(pS);return l&&l.static&&l.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=s.route.id),R.createElement($a.Provider,{value:t},o)}function _S(r,t,s,o){var l;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),r==null){var u;if(!s)return null;if(s.errors)r=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)r=s.matches;else return null}let d=r,h=(l=s)==null?void 0:l.errors;if(h!=null){let g=d.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);g>=0||At(!1),d=d.slice(0,Math.min(d.length,g+1))}let p=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let g=0;g=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((g,v,_)=>{let N,j=!1,k=null,w=null;s&&(N=h&&v.route.id?h[v.route.id]:void 0,k=v.route.errorElement||xS,p&&(m<0&&_===0?(TS("route-fallback"),j=!0,w=null):m===_&&(j=!0,w=v.route.hydrateFallbackElement||null)));let E=t.concat(d.slice(0,_+1)),F=()=>{let A;return N?A=k:j?A=w:v.route.Component?A=R.createElement(v.route.Component,null):v.route.element?A=v.route.element:A=g,R.createElement(SS,{match:v,routeContext:{outlet:g,matches:E,isDataRoute:s!=null},children:A})};return s&&(v.route.ErrorBoundary||v.route.errorElement||_===0)?R.createElement(ES,{location:s.location,revalidation:s.revalidation,component:k,error:N,children:F(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):F()},null)}var rg=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(rg||{});function kS(r){let t=R.useContext(mS);return t||At(!1),t}function bS(r){let t=R.useContext($a);return t||At(!1),t}function CS(r){let t=bS(),s=t.matches[t.matches.length-1];return s.route.id||At(!1),s.route.id}function RS(){var r;let t=R.useContext(ng),s=kS(rg.UseRouteError),o=CS();return t!==void 0?t:(r=s.errors)==null?void 0:r[o]}const Bp={};function TS(r,t,s){Bp[r]||(Bp[r]=!0)}function PS(r,t){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function _c(r){At(!1)}function OS(r){let{basename:t="/",children:s=null,location:o,navigationType:l=pr.Pop,navigator:u,static:d=!1,future:h}=r;Xc()&&At(!1);let p=t.replace(/^\/*/,"/"),m=R.useMemo(()=>({basename:p,navigator:u,static:d,future:Da({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof o=="string"&&(o=za(o));let{pathname:g="/",search:v="",hash:_="",state:N=null,key:j="default"}=o,k=R.useMemo(()=>{let w=Zy(g,p);return w==null?null:{location:{pathname:w,search:v,hash:_,state:N,key:j},navigationType:l}},[p,g,v,_,N,j,l]);return k==null?null:R.createElement(tg.Provider,{value:m},R.createElement(Zo.Provider,{children:s,value:k}))}function AS(r){let{children:t,location:s}=r;return gS(kc(t),s)}new Promise(()=>{});function kc(r,t){t===void 0&&(t=[]);let s=[];return R.Children.forEach(r,(o,l)=>{if(!R.isValidElement(o))return;let u=[...t,l];if(o.type===R.Fragment){s.push.apply(s,kc(o.props.children,u));return}o.type!==_c&&At(!1),!o.props.index||!o.props.children||At(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=kc(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const NS="6";try{window.__reactRouterVersion=NS}catch{}const LS="startTransition",zp=zm[LS];function FS(r){let{basename:t,children:s,future:o,window:l}=r,u=R.useRef();u.current==null&&(u.current=qE({window:l,v5Compat:!0}));let d=u.current,[h,p]=R.useState({action:d.action,location:d.location}),{v7_startTransition:m}=o||{},g=R.useCallback(v=>{m&&zp?zp(()=>p(v)):p(v)},[p,m]);return R.useLayoutEffect(()=>d.listen(g),[d,g]),R.useEffect(()=>PS(o),[o]),R.createElement(OS,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:o})}var $p;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})($p||($p={}));var Wp;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Wp||(Wp={}));function sg(r,t){return function(){return r.apply(t,arguments)}}const{toString:DS}=Object.prototype,{getPrototypeOf:Ms}=Object,{iterator:ei,toStringTag:og}=Symbol,Ia=(({hasOwnProperty:r})=>(t,s)=>r.call(t,s))(Object.prototype),Ho=(r,t)=>{let s=r;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),Ia(s,t))return!0;s=Ms(s)}return!1},IS=(r,t)=>r!=null&&Ho(r,t)?r[t]:void 0,Jc=(r=>t=>{const s=DS.call(t);return r[s]||(r[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),un=r=>(r=r.toLowerCase(),t=>Jc(t)===r),Wa=r=>t=>typeof t===r,{isArray:Xr}=Array,Us=Wa("undefined");function zs(r){return r!==null&&!Us(r)&&r.constructor!==null&&!Us(r.constructor)&&Ot(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const ig=un("ArrayBuffer");function jS(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&ig(r.buffer),t}const MS=Wa("string"),Ot=Wa("function"),ag=Wa("number"),$s=r=>r!==null&&typeof r=="object",US=r=>r===!0||r===!1,ba=r=>{if(!$s(r))return!1;const t=Ms(r);return(t===null||t===Object.prototype||Ms(t)===null)&&!Ho(r,og)&&!Ho(r,ei)},BS=r=>{if(!$s(r)||zs(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},zS=un("Date"),$S=un("File"),WS=r=>!!(r&&typeof r.uri<"u"),VS=r=>r&&typeof r.getParts<"u",HS=un("Blob"),qS=un("FileList"),QS=r=>$s(r)&&Ot(r.pipe);function KS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vp=KS(),Hp=typeof Vp.FormData<"u"?Vp.FormData:void 0,GS=r=>{if(!r)return!1;if(Hp&&r instanceof Hp)return!0;const t=Ms(r);if(!t||t===Object.prototype||!Ot(r.append))return!1;const s=Jc(r);return s==="formdata"||s==="object"&&Ot(r.toString)&&r.toString()==="[object FormData]"},XS=un("URLSearchParams"),[YS,JS,ZS,e1]=["ReadableStream","Request","Response","Headers"].map(un),t1=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ti(r,t,{allOwnKeys:s=!1}={}){if(r===null||typeof r>"u")return;let o,l;if(typeof r!="object"&&(r=[r]),Xr(r))for(o=0,l=r.length;o0;)if(l=s[o],t===l.toLowerCase())return l;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ug=r=>!Us(r)&&r!==Dr;function bc(...r){const{caseless:t,skipUndefined:s}=ug(this)&&this||{},o={},l=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&lg(o,d)||d,p=Ia(o,h)?o[h]:void 0;ba(p)&&ba(u)?o[h]=bc(p,u):ba(u)?o[h]=bc({},u):Xr(u)?o[h]=u.slice():(!s||!Us(u))&&(o[h]=u)};for(let u=0,d=r.length;u(ti(t,(l,u)=>{s&&Ot(l)?Object.defineProperty(r,u,{__proto__:null,value:sg(l,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,u,{__proto__:null,value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),r),r1=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),s1=(r,t,s,o)=>{r.prototype=Object.create(t.prototype,o),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(r.prototype,s)},o1=(r,t,s,o)=>{let l,u,d;const h={};if(t=t||{},r==null)return t;do{for(l=Object.getOwnPropertyNames(r),u=l.length;u-- >0;)d=l[u],(!o||o(d,r,t))&&!h[d]&&(t[d]=r[d],h[d]=!0);r=s!==!1&&Ms(r)}while(r&&(!s||s(r,t))&&r!==Object.prototype);return t},i1=(r,t,s)=>{r=String(r),(s===void 0||s>r.length)&&(s=r.length),s-=t.length;const o=r.indexOf(t,s);return o!==-1&&o===s},a1=r=>{if(!r)return null;if(Xr(r))return r;let t=r.length;if(!ag(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=r[t];return s},l1=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&Ms(Uint8Array)),u1=(r,t)=>{const o=(r&&r[ei]).call(r);let l;for(;(l=o.next())&&!l.done;){const u=l.value;t.call(r,u[0],u[1])}},c1=(r,t)=>{let s;const o=[];for(;(s=r.exec(t))!==null;)o.push(s);return o},d1=un("HTMLFormElement"),f1=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,l){return o.toUpperCase()+l}),{propertyIsEnumerable:h1}=Object.prototype,p1=un("RegExp"),cg=(r,t)=>{const s=Object.getOwnPropertyDescriptors(r),o={};ti(s,(l,u)=>{let d;(d=t(l,u,r))!==!1&&(o[u]=d||l)}),Object.defineProperties(r,o)},m1=r=>{cg(r,(t,s)=>{if(Ot(r)&&["arguments","caller","callee"].includes(s))return!1;const o=r[s];if(Ot(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},y1=(r,t)=>{const s={},o=l=>{l.forEach(u=>{s[u]=!0})};return Xr(r)?o(r):o(String(r).split(t)),s},g1=()=>{},v1=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t;function w1(r){return!!(r&&Ot(r.append)&&r[og]==="FormData"&&r[ei])}const x1=r=>{const t=new WeakSet,s=o=>{if($s(o)){if(t.has(o))return;if(zs(o))return o;if(!("toJSON"in o)){t.add(o);const l=Xr(o)?[]:{};return ti(o,(u,d)=>{const h=s(u);!Us(h)&&(l[d]=h)}),t.delete(o),l}}return o};return s(r)},E1=un("AsyncFunction"),S1=r=>r&&($s(r)||Ot(r))&&Ot(r.then)&&Ot(r.catch),dg=((r,t)=>r?setImmediate:t?((s,o)=>(Dr.addEventListener("message",({source:l,data:u})=>{l===Dr&&u===s&&o.length&&o.shift()()},!1),l=>{o.push(l),Dr.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Ot(Dr.postMessage)),_1=typeof queueMicrotask<"u"?queueMicrotask.bind(Dr):typeof process<"u"&&process.nextTick||dg,fg=r=>r!=null&&Ot(r[ei]),k1=r=>r!=null&&Ho(r,ei)&&fg(r),O={isArray:Xr,isArrayBuffer:ig,isBuffer:zs,isFormData:GS,isArrayBufferView:jS,isString:MS,isNumber:ag,isBoolean:US,isObject:$s,isPlainObject:ba,isEmptyObject:BS,isReadableStream:YS,isRequest:JS,isResponse:ZS,isHeaders:e1,isUndefined:Us,isDate:zS,isFile:$S,isReactNativeBlob:WS,isReactNative:VS,isBlob:HS,isRegExp:p1,isFunction:Ot,isStream:QS,isURLSearchParams:XS,isTypedArray:l1,isFileList:qS,forEach:ti,merge:bc,extend:n1,trim:t1,stripBOM:r1,inherits:s1,toFlatObject:o1,kindOf:Jc,kindOfTest:un,endsWith:i1,toArray:a1,forEachEntry:u1,matchAll:c1,isHTMLForm:d1,hasOwnProperty:Ia,hasOwnProp:Ia,hasOwnInPrototypeChain:Ho,getSafeProp:IS,reduceDescriptors:cg,freezeMethods:m1,toObjectSet:y1,toCamelCase:f1,noop:g1,toFiniteNumber:v1,findKey:lg,global:Dr,isContextDefined:ug,isSpecCompliantForm:w1,toJSONObject:x1,isAsyncFn:E1,isThenable:S1,setImmediate:dg,asap:_1,isIterable:fg,isSafeIterable:k1},b1=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),C1=r=>{const t={};let s,o,l;return r&&r.split(` `).forEach(function(d){l=d.indexOf(":"),s=d.substring(0,l).trim().toLowerCase(),o=d.substring(l+1).trim(),!(!s||t[s]&&b1[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function R1(r){let t=0,s=r.length;for(;tt;){const o=r.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===r.length?r:r.slice(t,s)}const T1=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),P1=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Zc(r,t){return O.isArray(r)?r.map(s=>Zc(s,t)):R1(String(r).replace(t,""))}const O1=r=>Zc(r,T1),A1=r=>Zc(r,P1);function hg(r){const t=Object.create(null);return O.forEach(r.toJSON(),(s,o)=>{t[o]=A1(s)}),t}const qp=Symbol("internals");function Ao(r){return r&&String(r).trim().toLowerCase()}function Ca(r){return r===!1||r==null?r:O.isArray(r)?r.map(Ca):O1(String(r))}function N1(r){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(r);)t[o[1]]=o[2];return t}const L1=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Qu(r,t,s,o,l){if(O.isFunction(o))return o.call(this,t,s);if(l&&(t=s),!!O.isString(t)){if(O.isString(o))return t.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(t)}}function F1(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function D1(r,t){const s=O.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+s,{__proto__:null,value:function(l,u,d){return this[o].call(this,t,l,u,d)},configurable:!0})})}let vt=class{constructor(t){t&&this.set(t)}set(t,s,o){const l=this;function u(h,p,m){const g=Ao(p);if(!g)return;const v=O.findKey(l,g);(!v||l[v]===void 0||m===!0||m===void 0&&l[v]!==!1)&&(l[v||p]=Ca(h))}const d=(h,p)=>O.forEach(h,(m,g)=>u(m,g,p));if(O.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(O.isString(t)&&(t=t.trim())&&!L1(t))d(C1(t),s);else if(O.isObject(t)&&O.isSafeIterable(t)){let h=Object.create(null),p,m;for(const g of t){if(!O.isArray(g))throw new TypeError("Object iterator must return a key-value pair");m=g[0],O.hasOwnProp(h,m)?(p=h[m],h[m]=O.isArray(p)?[...p,g[1]]:[p,g[1]]):h[m]=g[1]}d(h,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=Ao(t),t){const o=O.findKey(this,t);if(o){const l=this[o];if(!s)return l;if(s===!0)return N1(l);if(O.isFunction(s))return s.call(this,l,o);if(O.isRegExp(s))return s.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Ao(t),t){const o=O.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||Qu(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let l=!1;function u(d){if(d=Ao(d),d){const h=O.findKey(o,d);h&&(!s||Qu(o,o[h],h,s))&&(delete o[h],l=!0)}}return O.isArray(t)?t.forEach(u):u(t),l}clear(t){const s=Object.keys(this);let o=s.length,l=!1;for(;o--;){const u=s[o];(!t||Qu(this,this[u],u,t,!0))&&(delete this[u],l=!0)}return l}normalize(t){const s=this,o={};return O.forEach(this,(l,u)=>{const d=O.findKey(o,u);if(d){s[d]=Ca(l),delete s[u];return}const h=t?F1(u):String(u).trim();h!==u&&delete s[u],s[h]=Ca(l),o[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return O.forEach(this,(o,l)=>{o!=null&&o!==!1&&(s[l]=t&&O.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(l=>o.set(l)),o}static accessor(t){const o=(this[qp]=this[qp]={accessors:{}}).accessors,l=this.prototype;function u(d){const h=Ao(d);o[h]||(D1(l,d),o[h]=!0)}return O.isArray(t)?t.forEach(u):u(t),this}};vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(vt.prototype,({value:r},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[s]=o}}});O.freezeMethods(vt);const I1="[REDACTED ****]";function j1(r){if(O.hasOwnProp(r,"toJSON"))return!0;let t=Object.getPrototypeOf(r);for(;t&&t!==Object.prototype;){if(O.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function M1(r,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],l=u=>{if(u===null||typeof u!="object"||O.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof vt&&(u=u.toJSON()),o.push(u);let d;if(O.isArray(u))d=[],u.forEach((h,p)=>{const m=l(h);O.isUndefined(m)||(d[p]=m)});else{if(!O.isPlainObject(u)&&j1(u))return o.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const m=s.has(h.toLowerCase())?I1:l(p);O.isUndefined(m)||(d[h]=m)}}return o.pop(),d};return l(r)}let Y=class pg extends Error{static from(t,s,o,l,u,d){const h=new pg(t.message,s||t.code,o,l,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,o,l,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),l&&(this.request=l),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&O.hasOwnProp(t,"redact")?t.redact:void 0,o=O.isArray(s)&&s.length>0?M1(t,s):O.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ECONNREFUSED="ECONNREFUSED";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const U1=null,mg=100;function Cc(r){return O.isPlainObject(r)||O.isArray(r)}function yg(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function Ku(r,t,s){return r?r.concat(t).map(function(l,u){return l=yg(l),!s&&u?"["+l+"]":l}).join(s?".":""):t}function B1(r){return O.isArray(r)&&!r.some(Cc)}const z1=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Va(r,t,s){if(!O.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,s=O.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(F,A){return!O.isUndefined(A[F])});const o=s.metaTokens,l=s.visitor||j,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?mg:s.maxDepth,m=h&&O.isSpecCompliantForm(t),g=[];if(!O.isFunction(l))throw new TypeError("visitor must be a function");function v(E){if(E===null)return"";if(O.isDate(E))return E.toISOString();if(O.isBoolean(E))return E.toString();if(!m&&O.isBlob(E))throw new Y("Blob is not supported. Use a Buffer instead.");if(O.isArrayBuffer(E)||O.isTypedArray(E)){if(m&&typeof h=="function")return new h([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new Y("Blob is not supported. Use a Buffer instead.",Y.ERR_NOT_SUPPORT)}return E}function _(E){if(E>p)throw new Y("Object is too deeply nested ("+E+" levels). Max depth: "+p,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function N(E,F){if(p===1/0)return JSON.stringify(E);const A=[];return JSON.stringify(E,function(W,$){if(!O.isObject($))return $;for(;A.length&&A[A.length-1]!==this;)A.pop();return A.push($),_(F+A.length-1),$})}function j(E,F,A){let L=E;if(O.isReactNative(t)&&O.isReactNativeBlob(E))return t.append(Ku(A,F,u),v(E)),!1;if(E&&!A&&typeof E=="object"){if(O.endsWith(F,"{}"))F=o?F:F.slice(0,-2),E=N(E,1);else if(O.isArray(E)&&B1(E)||(O.isFileList(E)||O.endsWith(F,"[]"))&&(L=O.toArray(E)))return F=yg(F),L.forEach(function($,G){!(O.isUndefined($)||$===null)&&t.append(d===!0?Ku([F],G,u):d===null?F:F+"[]",v($))}),!1}return Cc(E)?!0:(t.append(Ku(A,F,u),v(E)),!1)}const k=Object.assign(z1,{defaultVisitor:j,convertValue:v,isVisitable:Cc});function w(E,F,A=0){if(!O.isUndefined(E)){if(_(A),g.indexOf(E)!==-1)throw new Error("Circular reference detected in "+F.join("."));g.push(E),O.forEach(E,function(W,$){(!(O.isUndefined(W)||W===null)&&l.call(t,W,O.isString($)?$.trim():$,F,k))===!0&&w(W,F?F.concat($):[$],A+1)}),g.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return w(r),t}function Qp(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(r).replace(/[!'()~]|%20/g,function(o){return t[o]})}function ed(r,t){this._pairs=[],r&&Va(r,this,t)}const gg=ed.prototype;gg.append=function(t,s){this._pairs.push([t,s])};gg.toString=function(t){const s=t?o=>t.call(this,o,Qp):Qp;return this._pairs.map(function(l){return s(l[0])+"="+s(l[1])},"").join("&")};function $1(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vg(r,t,s){if(!t)return r;r=r||"";const o=O.isFunction(s)?{serialize:s}:s,l=O.getSafeProp(o,"encode")||$1,u=O.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=O.isURLSearchParams(t)?t.toString():new ed(t,o).toString(l),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Kp{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(o){o!==null&&t(o)})}}const td={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},W1=typeof URLSearchParams<"u"?URLSearchParams:ed,V1=typeof FormData<"u"?FormData:null,H1=typeof Blob<"u"?Blob:null,q1={isBrowser:!0,classes:{URLSearchParams:W1,FormData:V1,Blob:H1},protocols:["http","https","file","blob","url","data"]},nd=typeof window<"u"&&typeof document<"u",Rc=typeof navigator=="object"&&navigator||void 0,Q1=nd&&(!Rc||["ReactNative","NativeScript","NS"].indexOf(Rc.product)<0),K1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",G1=nd&&window.location.href||"http://localhost",X1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nd,hasStandardBrowserEnv:Q1,hasStandardBrowserWebWorkerEnv:K1,navigator:Rc,origin:G1},Symbol.toStringTag,{value:"Module"})),dt={...X1,...q1};function Y1(r,t){return Va(r,new dt.classes.URLSearchParams,{visitor:function(s,o,l,u){return dt.isNode&&O.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const Gp=mg;function wg(r){if(r>Gp)throw new Y("FormData field is too deeply nested ("+r+" levels). Max depth: "+Gp,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function J1(r){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(r))!==null;)wg(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Z1(r){const t={},s=Object.keys(r);let o;const l=s.length;let u;for(o=0;o=s.length;return d=!d&&O.isArray(l)?l.length:d,p?(O.hasOwnProp(l,d)?l[d]=O.isArray(l[d])?l[d].concat(o):[l[d],o]:l[d]=o,!h):((!O.hasOwnProp(l,d)||!O.isObject(l[d]))&&(l[d]=[]),t(s,o,l[d],u)&&O.isArray(l[d])&&(l[d]=Z1(l[d])),!h)}if(O.isFormData(r)&&O.isFunction(r.entries)){const s={};return O.forEachEntry(r,(o,l)=>{t(J1(o),l,s,0)}),s}return null}const _s=(r,t)=>r!=null&&O.hasOwnProp(r,t)?r[t]:void 0;function e_(r,t,s){if(O.isString(r))try{return(t||JSON.parse)(r),O.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(r)}const ni={transitional:td,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",l=o.indexOf("application/json")>-1,u=O.isObject(t);if(u&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return l?JSON.stringify(xg(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t)||O.isReadableStream(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=_s(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Y1(t,p).toString();if((h=O.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=_s(this,"env"),g=m&&m.FormData;return Va(h?{"files[]":t}:t,g&&new g,p)}}return u||l?(s.setContentType("application/json",!1),e_(t)):t}],transformResponse:[function(t){const s=_s(this,"transitional")||ni.transitional,o=s&&s.forcedJSONParsing,l=_s(this,"responseType"),u=l==="json";if(O.isResponse(t)||O.isReadableStream(t))return t;if(t&&O.isString(t)&&(o&&!l||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,_s(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?Y.from(p,Y.ERR_BAD_RESPONSE,this,null,_s(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch","query"],r=>{ni.headers[r]={}});function Gu(r,t){const s=this||ni,o=t||s,l=vt.from(o.headers);let u=o.data;return O.forEach(r,function(h){u=h.call(s,u,l.normalize(),t?t.status:void 0)}),l.normalize(),u}function Eg(r){return!!(r&&r.__CANCEL__)}let ri=class extends Y{constructor(t,s,o){super(t??"canceled",Y.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function Sg(r,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?r(s):t(new Y("Request failed with status code "+s.status,s.status>=400&&s.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,s.config,s.request,s))}function t_(r){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(r);return t&&t[1]||""}function n_(r,t){r=r||10;const s=new Array(r),o=new Array(r);let l=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),g=o[u];d||(d=m),s[l]=p,o[l]=m;let v=u,_=0;for(;v!==l;)_+=s[v++],v=v%r;if(l=(l+1)%r,l===u&&(u=(u+1)%r),m-d{s=g,l=null,u&&(clearTimeout(u),u=null),r(...m)};return[(...m)=>{const g=Date.now(),v=g-s;v>=o?d(m,g):(l=m,u||(u=setTimeout(()=>{u=null,d(l)},o-v)))},()=>l&&d(l)]}const ja=(r,t,s=3)=>{let o=0;const l=n_(50,250);return r_(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,m=Math.max(0,p-o),g=l(m);o=Math.max(o,p);const v={loaded:p,total:h,progress:h?p/h:void 0,bytes:m,rate:g||void 0,estimated:g&&h?(h-p)/g:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};r(v)},s)},Xp=(r,t)=>{const s=r!=null;return[o=>t[0]({lengthComputable:s,total:r,loaded:o}),t[1]]},Yp=r=>(...t)=>O.asap(()=>r(...t)),s_=dt.hasStandardBrowserEnv?((r,t)=>s=>(s=new URL(s,dt.origin),r.protocol===s.protocol&&r.host===s.host&&(t||r.port===s.port)))(new URL(dt.origin),dt.navigator&&/(msie|trident)/i.test(dt.navigator.userAgent)):()=>!0,o_=dt.hasStandardBrowserEnv?{write(r,t,s,o,l,u,d){if(typeof document>"u")return;const h=[`${r}=${encodeURIComponent(t)}`];O.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),O.isString(o)&&h.push(`path=${o}`),O.isString(l)&&h.push(`domain=${l}`),u===!0&&h.push("secure"),O.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(r){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sr instanceof vt?{...r}:r;function Yr(r,t){r=r||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(g,v,_,N){return O.isPlainObject(g)&&O.isPlainObject(v)?O.merge.call({caseless:N},g,v):O.isPlainObject(v)?O.merge({},v):O.isArray(v)?v.slice():v}function l(g,v,_,N){if(O.isUndefined(v)){if(!O.isUndefined(g))return o(void 0,g,_,N)}else return o(g,v,_,N)}function u(g,v){if(!O.isUndefined(v))return o(void 0,v)}function d(g,v){if(O.isUndefined(v)){if(!O.isUndefined(g))return o(void 0,g)}else return o(void 0,v)}function h(g){const v=O.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!O.isUndefined(v))if(O.isPlainObject(v)){if(O.hasOwnProp(v,g))return v[g]}else return;const _=O.hasOwnProp(r,"transitional")?r.transitional:void 0;if(O.isPlainObject(_)&&O.hasOwnProp(_,g))return _[g]}function p(g,v,_){if(O.hasOwnProp(t,_))return o(g,v);if(O.hasOwnProp(r,_))return o(void 0,g)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(g,v,_)=>l(Zp(g),Zp(v),_,!0)};return O.forEach(Object.keys({...r,...t}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const _=O.hasOwnProp(m,v)?m[v]:l,N=O.hasOwnProp(r,v)?r[v]:void 0,j=O.hasOwnProp(t,v)?t[v]:void 0,k=_(N,j,v);O.isUndefined(k)&&_!==p||(s[v]=k)}),O.hasOwnProp(t,"validateStatus")&&O.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(O.hasOwnProp(r,"validateStatus")?s.validateStatus=o(void 0,r.validateStatus):delete s.validateStatus),s}const f_=["content-type","content-length"];function h_(r,t,s){if(s!=="content-only"){r.set(t);return}Object.entries(t||{}).forEach(([o,l])=>{f_.includes(o.toLowerCase())&&r.set(o,l)})}const p_=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function kg(r){const t=Yr({},r),s=_=>O.hasOwnProp(t,_)?t[_]:void 0,o=s("data");let l=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),m=s("baseURL"),g=s("allowAbsoluteUrls"),v=s("url");if(t.headers=h=vt.from(h),t.url=vg(_g(m,v,g,t),s("params"),s("paramsSerializer")),p){const _=O.getSafeProp(p,"username")||"",N=O.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(_+":"+(N?p_(N):"")))}catch(j){throw Y.from(j,Y.ERR_BAD_OPTION_VALUE,r)}}if(O.isFormData(o)&&(dt.hasStandardBrowserEnv||dt.hasStandardBrowserWebWorkerEnv||O.isReactNative(o)?h.setContentType(void 0):O.isFunction(o.getHeaders)&&h_(h,o.getHeaders(),s("formDataHeaderPolicy"))),dt.hasStandardBrowserEnv&&(O.isFunction(l)&&(l=l(t)),l===!0||l==null&&s_(t.url))){const N=u&&d&&o_.read(d);N&&h.set(u,N)}return t}const m_=typeof XMLHttpRequest<"u",y_=m_&&function(r){return new Promise(function(s,o){const l=kg(r);let u=l.data;const d=vt.from(l.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=l,g,v,_,N,j;function k(){N&&N(),j&&j(),l.cancelToken&&l.cancelToken.unsubscribe(g),l.signal&&l.signal.removeEventListener("abort",g)}let w=new XMLHttpRequest;w.open(l.method.toUpperCase(),l.url,!0),w.timeout=l.timeout;function E(){if(!w)return;const A=vt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),W={data:!h||h==="text"||h==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:A,config:r,request:w};Sg(function(G){s(G),k()},function(G){o(G),k()},W),w=null}"onloadend"in w?w.onloadend=E:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(E)},w.onabort=function(){w&&(o(new Y("Request aborted",Y.ECONNABORTED,r,w)),k(),w=null)},w.onerror=function(L){const W=L&&L.message?L.message:"Network Error",$=new Y(W,Y.ERR_NETWORK,r,w);$.event=L||null,o($),k(),w=null},w.ontimeout=function(){let L=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const W=l.transitional||td;l.timeoutErrorMessage&&(L=l.timeoutErrorMessage),o(new Y(L,W.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,r,w)),k(),w=null},u===void 0&&d.setContentType(null),"setRequestHeader"in w&&O.forEach(hg(d),function(L,W){w.setRequestHeader(W,L)}),O.isUndefined(l.withCredentials)||(w.withCredentials=!!l.withCredentials),h&&h!=="json"&&(w.responseType=l.responseType),m&&([_,j]=ja(m,!0),w.addEventListener("progress",_)),p&&w.upload&&([v,N]=ja(p),w.upload.addEventListener("progress",v),w.upload.addEventListener("loadend",N)),(l.cancelToken||l.signal)&&(g=A=>{w&&(o(!A||A.type?new ri(null,r,w):A),w.abort(),k(),w=null)},l.cancelToken&&l.cancelToken.subscribe(g),l.signal&&(l.signal.aborted?g():l.signal.addEventListener("abort",g)));const F=t_(l.url);if(F&&!dt.protocols.includes(F)){o(new Y("Unsupported protocol "+F+":",Y.ERR_BAD_REQUEST,r)),k();return}w.send(u||null)})},g_=(r,t)=>{if(r=r?r.filter(Boolean):[],!t&&!r.length)return;const s=new AbortController;let o=!1;const l=function(p){if(!o){o=!0,d();const m=p instanceof Error?p:this.reason;s.abort(m instanceof Y?m:new ri(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,l(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const d=()=>{r&&(u&&clearTimeout(u),u=null,r.forEach(p=>{p.unsubscribe?p.unsubscribe(l):p.removeEventListener("abort",l)}),r=null)};r.forEach(p=>p.addEventListener("abort",l,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>O.asap(d),h},v_=function*(r,t){let s=r.byteLength;if(s{const l=w_(r,t);let u=0,d,h=p=>{d||(d=!0,o&&o(p))};return new ReadableStream({async pull(p){try{const{done:m,value:g}=await l.next();if(m){h(),p.close();return}let v=g.byteLength;if(s){let _=u+=v;s(_)}p.enqueue(new Uint8Array(g))}catch(m){throw h(m),m}},cancel(p){return h(p),l.return()}},{highWaterMark:2})},Ma=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,E_=(r,t,s)=>t+2N>=2&&o.charCodeAt(N-2)===37&&o.charCodeAt(N-1)===51&&(o.charCodeAt(N)===68||o.charCodeAt(N)===100);m>=0&&(o.charCodeAt(m)===61?(p++,m--):g(m)&&(p++,m-=3)),p===1&&m>=0&&(o.charCodeAt(m)===61||g(m))&&p++;const _=Math.floor(d/4)*3-(p||0);return _>0?_:0}let u=0;for(let d=0,h=o.length;d=55296&&p<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const rd="1.18.1",tm=64*1024,{isFunction:wa}=O,__=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),nm=r=>{if(!O.isString(r))return r;try{return decodeURIComponent(r)}catch{return r}},rm=(r,...t)=>{try{return!!r(...t)}catch{return!1}},k_=r=>{const t=r.indexOf("://");let s=r;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},b_=r=>{const t=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;r=O.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},r);const{fetch:l,Request:u,Response:d}=r,h=l?wa(l):typeof fetch=="function",p=wa(u),m=wa(d);if(!h)return!1;const g=h&&wa(s),v=h&&(typeof o=="function"?(E=>F=>E.encode(F))(new o):async E=>new Uint8Array(await new u(E).arrayBuffer())),_=p&&g&&rm(()=>{let E=!1;const F=new u(dt.origin,{body:new s,method:"POST",get duplex(){return E=!0,"half"}}),A=F.headers.has("Content-Type");return F.body!=null&&F.body.cancel(),E&&!A}),N=m&&g&&rm(()=>O.isReadableStream(new d("").body)),j={stream:N&&(E=>E.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!j[E]&&(j[E]=(F,A)=>{let L=F&&F[E];if(L)return L.call(F);throw new Y(`Response type '${E}' is not supported`,Y.ERR_NOT_SUPPORT,A)})});const k=async E=>{if(E==null)return 0;if(O.isBlob(E))return E.size;if(O.isSpecCompliantForm(E))return(await new u(dt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(O.isArrayBufferView(E)||O.isArrayBuffer(E))return E.byteLength;if(O.isURLSearchParams(E)&&(E=E+""),O.isString(E))return(await v(E)).byteLength},w=async(E,F)=>{const A=O.toFiniteNumber(E.getContentLength());return A??k(F)};return async E=>{let{url:F,method:A,data:L,signal:W,cancelToken:$,timeout:G,onDownloadProgress:z,onUploadProgress:ie,responseType:ue,headers:Ee,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:_e}=kg(E);const Se=O.isNumber(J)&&J>-1,ke=O.isNumber(_e)&&_e>-1,K=X=>O.hasOwnProp(E,X)?E[X]:void 0;let ae=l||fetch;ue=ue?(ue+"").toLowerCase():"text";let U=g_([W,$&&$.toAbortSignal()],G),P=null;const B=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let ce,me=null;const he=()=>new Y("Request body larger than maxBodyLength limit",Y.ERR_BAD_REQUEST,E,P);try{let X;const ve=K("auth");if(ve){const we=O.getSafeProp(ve,"username")||"",it=O.getSafeProp(ve,"password")||"";X={username:we,password:it}}if(k_(F)){const we=new URL(F,dt.origin);if(!X&&(we.username||we.password)){const it=nm(we.username),Xt=nm(we.password);X={username:it,password:Xt}}(we.username||we.password)&&(we.username="",we.password="",F=we.href)}if(X&&(Ee.delete("authorization"),Ee.set("Authorization","Basic "+btoa(__((X.username||"")+":"+(X.password||""))))),Se&&typeof F=="string"&&F.startsWith("data:")&&S_(F)>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P);if(ke&&A!=="get"&&A!=="head"){const we=await k(L);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>_e))throw he()}const Re=ke&&(O.isReadableStream(L)||O.isStream(L)),ge=(we,it,Xt)=>em(we,tm,Yt=>{if(ke&&Yt>_e)throw me=he();it&&it(Yt)},Xt);if(_&&A!=="get"&&A!=="head"&&(ie||Re)){if(ce=ce??await w(Ee,L),ce!==0||Re){let we=new u(F,{method:"POST",body:L,duplex:"half"}),it;if(O.isFormData(L)&&(it=we.headers.get("content-type"))&&Ee.setContentType(it),we.body){const[Xt,Yt]=ie&&Xp(ce,ja(Yp(ie)))||[];L=ge(we.body,Xt,Yt)}}}else if(Re&&!p&&g&&A!=="get"&&A!=="head")L=ge(L);else if(Re&&p&&!_&&A!=="get"&&A!=="head")throw new Y("Stream request bodies are not supported by the current fetch implementation",Y.ERR_NOT_SUPPORT,E,P);O.isString(Te)||(Te=Te?"include":"omit");const et=p&&"credentials"in u.prototype;if(O.isFormData(L)){const we=Ee.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Ee.delete("content-type")}Ee.set("User-Agent","axios/"+rd,!1);const jt={...xe,signal:U,method:A.toUpperCase(),headers:hg(Ee.normalize()),body:L,duplex:"half",credentials:et?Te:void 0};P=p&&new u(F,jt);let ot=await(p?ae(P,xe):ae(F,jt));const Gt=vt.from(ot.headers);if(Se){const we=O.toFiniteNumber(Gt.getContentLength());if(we!=null&&we>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P)}const Mt=N&&(ue==="stream"||ue==="response");if(N&&ot.body&&(z||Se||Mt&&B)){const we={};["status","statusText","headers"].forEach(En=>{we[En]=ot[En]});const it=O.toFiniteNumber(Gt.getContentLength()),[Xt,Yt]=z&&Xp(it,ja(Yp(z),!0))||[];let Dn=0;const In=En=>{if(Se&&(Dn=En,Dn>J))throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P);Xt&&Xt(En)};ot=new d(em(ot.body,tm,In,()=>{Yt&&Yt(),B&&B()}),we)}ue=ue||"text";let Ut=await j[O.findKey(j,ue)||"text"](ot,E);if(Se&&!N&&!Mt){let we;if(Ut!=null&&(typeof Ut.byteLength=="number"?we=Ut.byteLength:typeof Ut.size=="number"?we=Ut.size:typeof Ut=="string"&&(we=typeof o=="function"?new o().encode(Ut).byteLength:Ut.length)),typeof we=="number"&&we>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P)}return!Mt&&B&&B(),await new Promise((we,it)=>{Sg(we,it,{data:Ut,headers:vt.from(ot.headers),status:ot.status,statusText:ot.statusText,config:E,request:P})})}catch(X){if(B&&B(),U&&U.aborted&&U.reason instanceof Y){const ve=U.reason;throw ve.config=E,P&&(ve.request=P),X!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw P&&!me.request&&(me.request=P),me;if(X instanceof Y)throw P&&!X.request&&(X.request=P),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const ve=new Y("Network Error",Y.ERR_NETWORK,E,P,X&&X.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),ve}throw Y.from(X,X&&X.code,E,P,X&&X.response)}}},C_=new Map,bg=r=>{let t=r&&r.env||{};const{fetch:s,Request:o,Response:l}=t,u=[o,l,s];let d=u.length,h=d,p,m,g=C_;for(;h--;)p=u[h],m=g.get(p),m===void 0&&g.set(p,m=h?new Map:b_(t)),g=m;return m};bg();const sd={http:U1,xhr:y_,fetch:{get:bg}};O.forEach(sd,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(r,"adapterName",{__proto__:null,value:t})}});const sm=r=>`- ${r}`,R_=r=>O.isFunction(r)||r===null||r===!1;function T_(r,t){r=O.isArray(r)?r:[r];const{length:s}=r;let o,l;const u={};for(let d=0;d`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(sm).join(` `):" "+sm(d[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+h,Y.ERR_NOT_SUPPORT)}return l}const Cg={getAdapter:T_,adapters:sd};function Xu(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ri(null,r)}function om(r){return Xu(r),r.headers=vt.from(r.headers),r.data=Gu.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Cg.getAdapter(r.adapter||ni.adapter,r)(r).then(function(o){Xu(r),r.response=o;try{o.data=Gu.call(r,r.transformResponse,o)}finally{delete r.response}return o.headers=vt.from(o.headers),o},function(o){if(!Eg(o)&&(Xu(r),o&&o.response)){r.response=o.response;try{o.response.data=Gu.call(r,r.transformResponse,o.response)}finally{delete r.response}o.response.headers=vt.from(o.response.headers)}return Promise.reject(o)})}const Ha={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{Ha[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const im={};Ha.transitional=function(t,s,o){function l(u,d){return"[Axios v"+rd+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,h)=>{if(t===!1)throw new Y(l(d," has been removed"+(s?" in "+s:"")),Y.ERR_DEPRECATED);return s&&!im[d]&&(im[d]=!0,console.warn(l(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Ha.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function P_(r,t,s){if(typeof r!="object"||r===null)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let l=o.length;for(;l-- >0;){const u=o[l],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=r[u],p=h===void 0||d(h,u,r);if(p!==!0)throw new Y("option "+u+" must be "+p,Y.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new Y("Unknown option "+u,Y.ERR_BAD_OPTION)}}const Ra={assertOptions:P_,validators:Ha},yt=Ra.validators;let Hr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Kp,response:new Kp}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const u=(()=>{if(!l.stack)return"";const d=l.stack.indexOf(` `);return d===-1?"":l.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(o.stack).endsWith(p)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Yr(this.defaults,s);const{transitional:o,paramsSerializer:l,headers:u}=s;o!==void 0&&Ra.assertOptions(o,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean),legacyInterceptorReqResOrdering:yt.transitional(yt.boolean),advertiseZstdAcceptEncoding:yt.transitional(yt.boolean),validateStatusUndefinedResolves:yt.transitional(yt.boolean)},!1),l!=null&&(O.isFunction(l)?s.paramsSerializer={serialize:l}:Ra.assertOptions(l,{encode:yt.function,serialize:yt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Ra.assertOptions(s,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&O.merge(u.common,u[s.method]);u&&O.forEach(["delete","get","head","post","put","patch","query","common"],j=>{delete u[j]}),s.headers=vt.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(s)===!1)return;p=p&&k.synchronous;const w=s.transitional||td;w&&w.legacyInterceptorReqResOrdering?h.unshift(k.fulfilled,k.rejected):h.push(k.fulfilled,k.rejected)});const m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let g,v=0,_;if(!p){const j=[om.bind(this),void 0];for(j.unshift(...h),j.push(...m),_=j.length,g=Promise.resolve(s);v<_;)g=g.then(j[v++],j[v++]);return g}_=h.length;let N=s;for(;v<_;){const j=h[v++],k=h[v++];try{N=j(N)}catch(w){k.call(this,w);break}}try{g=om.call(this,N)}catch(j){return Promise.reject(j)}for(v=0,_=m.length;v<_;)g=g.then(m[v++],m[v++]);return g}getUri(t){t=Yr(this.defaults,t);const s=_g(t.baseURL,t.url,t.allowAbsoluteUrls,t);return vg(s,t.params,t.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(t){Hr.prototype[t]=function(s,o){return this.request(Yr(o||{},{method:t,url:s,data:o&&O.hasOwnProp(o,"data")?o.data:void 0}))}});O.forEach(["post","put","patch","query"],function(t){function s(o){return function(u,d,h){return this.request(Yr(h||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Hr.prototype[t]=s(),t!=="query"&&(Hr.prototype[t+"Form"]=s(!0))});let O_=class Rg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(u){s=u});const o=this;this.promise.then(l=>{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](l);o._listeners=null}),this.promise.then=l=>{let u;const d=new Promise(h=>{o.subscribe(h),u=h}).then(l);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,h){o.reason||(o.reason=new ri(u,d,h),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Rg(function(l){t=l}),cancel:t}}};function A_(r){return function(s){return r.apply(null,s)}}function N_(r){return O.isObject(r)&&r.isAxiosError===!0}const Tc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Tc).forEach(([r,t])=>{Tc[t]=r});function Tg(r){const t=new Hr(r),s=sg(Hr.prototype.request,t);return O.extend(s,Hr.prototype,t,{allOwnKeys:!0}),O.extend(s,t,null,{allOwnKeys:!0}),s.create=function(l){return Tg(Yr(r,l))},s}const Ke=Tg(ni);Ke.Axios=Hr;Ke.CanceledError=ri;Ke.CancelToken=O_;Ke.isCancel=Eg;Ke.VERSION=rd;Ke.toFormData=Va;Ke.AxiosError=Y;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=A_;Ke.isAxiosError=N_;Ke.mergeConfig=Yr;Ke.AxiosHeaders=vt;Ke.formToJSON=r=>xg(O.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=Cg.getAdapter;Ke.HttpStatusCode=Tc;Ke.default=Ke;const{Axios:sC,AxiosError:oC,CanceledError:iC,isCancel:aC,CancelToken:lC,VERSION:uC,all:cC,Cancel:dC,isAxiosError:fC,spread:hC,toFormData:pC,AxiosHeaders:mC,HttpStatusCode:yC,formToJSON:gC,getAdapter:vC,mergeConfig:wC,create:xC}=Ke,Pg=typeof window>"u",am=!Pg&&window.self!==window.top,L_=!Pg&&typeof document>"u",Yu=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ut=[];for(let r=0;r<256;++r)ut.push((r+256).toString(16).slice(1));function F_(r,t=0){return(ut[r[t+0]]+ut[r[t+1]]+ut[r[t+2]]+ut[r[t+3]]+"-"+ut[r[t+4]]+ut[r[t+5]]+"-"+ut[r[t+6]]+ut[r[t+7]]+"-"+ut[r[t+8]]+ut[r[t+9]]+"-"+ut[r[t+10]]+ut[r[t+11]]+ut[r[t+12]]+ut[r[t+13]]+ut[r[t+14]]+ut[r[t+15]]).toLowerCase()}let Ju;const D_=new Uint8Array(16);function I_(){if(!Ju){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ju=crypto.getRandomValues.bind(crypto)}return Ju(D_)}const j_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lm={randomUUID:j_};function M_(r,t,s){var l;r=r||{};const o=r.random??((l=r.rng)==null?void 0:l.call(r))??I_();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,F_(o)}function U_(r,t,s){return lm.randomUUID&&!r?lm.randomUUID():M_(r)}const No=typeof window<"u"?window:{base44SharedInstances:{}};function B_(r,t){return No.base44SharedInstances||(No.base44SharedInstances={}),No.base44SharedInstances[r]||(No.base44SharedInstances[r]={instance:t()}),No.base44SharedInstances[r].instance}const z_="__user_heartbeat_event__",$_="__initialization_event__",W_="__session_duration_event__",um="analytics-enable",cm="base44_analytics_session_id",V_={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},H_="analytics",je=B_(H_,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...V_,...Z_()}})),q_=({axiosClient:r,serverUrl:t,appId:s,userAuthModule:o})=>{var l;const{maxQueueSize:u,throttleTime:d,batchSize:h}=je.config;if(!(!((l=je.config)===null||l===void 0)&&l.enabled)||L_)return{track:()=>{},cleanup:()=>{}};let p;const m=`${t}/api/apps/${s}/analytics/track/batch`,g=async A=>{await r.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:A}})},v=A=>{try{const L=JSON.stringify({events:A}),W=new Blob([L],{type:"application/json"});return typeof navigator>"u"||L.length>6e4||!navigator.sendBeacon(m,W)}catch{return!1}},_=async(A,L={})=>{if(A.length===0)return;const W=await J_(o),$=A.map(Y_(W));try{(!L.isBeacon||!v($))&&await g($)}catch{}},N=()=>{fm(_,{throttleTime:d,batchSize:h})},j=A=>{if(je.requestsQueue.length>=u)return;const L=X_();je.requestsQueue.push({...A,...L}),N()},k=()=>{fm(_,{throttleTime:d,batchSize:h}),p=hm(j),K_()},w=()=>{dm(),p==null||p(),G_(j);const A=je.requestsQueue.splice(0);_(A,{isBeacon:!0})},E=()=>{typeof window>"u"||(document.visibilityState==="hidden"?w():document.visibilityState==="visible"&&k())},F=()=>{dm(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",E)};return N(),p=hm(j),Q_(j),typeof window<"u"&&window.addEventListener("visibilitychange",E),{track:j,cleanup:F}};function dm(){je.isProcessing=!1}async function fm(r,t){if(je.isProcessing)return;je.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;je.isProcessing&&je.requestsQueue.length>0;){const l=je.requestsQueue.splice(0,o);l.length&&await r(l),await new Promise(u=>setTimeout(u,s))}je.isProcessing=!1}function hm(r){var t;if(typeof window>"u"||je.isHeartBeatProcessing||((t=je.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};je.isHeartBeatProcessing=!0;const s=setInterval(()=>{r({eventName:z_})},je.config.heartBeatInterval);return()=>{clearInterval(s),je.isHeartBeatProcessing=!1}}function Q_(r){typeof window>"u"||je.wasInitializationTracked||(je.wasInitializationTracked=!0,r({eventName:$_,properties:{referrer:document==null?void 0:document.referrer}}))}function K_(){typeof window>"u"||je.sessionStartTime!==null||(je.sessionStartTime=new Date().toISOString())}function G_(r){if(typeof window>"u"||je.sessionStartTime===null)return;const t=new Date().getTime()-new Date(je.sessionStartTime).getTime();je.sessionStartTime=null,r({eventName:W_,properties:{sessionDuration:t}})}function X_(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function Y_(r){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...r})}let Do=null;function pm(){je.sessionContext=null,Do=null}async function J_(r){if(!je.sessionContext){if(!r.hasToken())return{user_id:null,session_id:Ua()};if(!Do){const o=Ua();Do=r.me().then(l=>({user_id:l.id,session_id:o})).catch(()=>({user_id:null,session_id:o}))}const t=Do,s=await t;return Do===t&&(je.sessionContext=s),s}return je.sessionContext}function Z_(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(um);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(um);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function Ua(){if(typeof window>"u")return Yu();try{const r=localStorage.getItem(cm);if(!r){const t=Yu();return localStorage.setItem(cm,t),t}return r}catch{return Yu()}}class ek extends Error{constructor(t,s,o,l,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=l,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Io({baseURL:r,headers:t={},token:s,interceptResponses:o=!0,onError:l}){const u=Ke.create({baseURL:r,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",Ua()));const h=U_();if(d.requestId=h,am)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:r+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{am&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,m,g,v,_,N,j,k,w,E,F,A,L,W;const $=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((g=(m=d.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||d.message,G=new ek($,(v=d.response)===null||v===void 0?void 0:v.status,(F=(j=(N=(_=d.response)===null||_===void 0?void 0:_.data)===null||N===void 0?void 0:N.code)!==null&&j!==void 0?j:(E=(w=(k=d.response)===null||k===void 0?void 0:k.headers)===null||w===void 0?void 0:w.get)===null||E===void 0?void 0:E.call(w,"x-base44-connector-error"))!==null&&F!==void 0?F:(L=(A=d.response)===null||A===void 0?void 0:A.headers)===null||L===void 0?void 0:L["x-base44-connector-error"],(W=d.response)===null||W===void 0?void 0:W.data,d);return l==null||l(G),Promise.reject(G)}),u}function mm(r){const{axios:t,appId:s,getSocket:o}=r;return new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return nk(t,s,u,o)}})}function tk(r){var t;try{const s=JSON.parse(r);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function nk(r,t,s,o){const l=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const m={};return u&&(m.sort=u),d&&(m.limit=d),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),r.get(l,{params:m})},async filter(u,d,h,p,m){const g={q:JSON.stringify(u)};return d&&(g.sort=d),h&&(g.limit=h),p&&(g.skip=p),m&&(g.fields=Array.isArray(m)?m.join(","):m),r.get(l,{params:g})},async get(u){return r.get(`${l}/${u}`)},async create(u){return r.post(l,u)},async update(u,d){return r.put(`${l}/${u}`,d)},async delete(u){return r.delete(`${l}/${u}`)},async deleteMany(u){return r.delete(l,{data:u})},async bulkCreate(u){return r.post(`${l}/bulk`,u)},async updateMany(u,d){return r.patch(`${l}/update-many`,{query:u,data:d})},async bulkUpdate(u){return r.put(`${l}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),r.post(`${l}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var g;const v=tk(m.data);if(v){v.type!=="delete"&&(!((g=v.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${v.id}")\` to fetch the full record.`);try{u(v)}catch(_){console.error("[Base44 SDK] Subscription callback error:",_)}}}})}}}function rk(r,t){return{async call(s,o,l){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=l??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await r.post(`/apps/${t}/integrations/custom/${s}/${o}`,p)}}}function ym(r,t){const s=rk(r,t);return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return l==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,m;return h instanceof FormData||h&&Object.values(h).some(g=>g instanceof File)?(p=new FormData,Object.keys(h).forEach(g=>{h[g]instanceof File?p.append(g,h[g],h[g].name):typeof h[g]=="object"&&h[g]!==null?p.append(g,JSON.stringify(h[g])):p.append(g,h[g])}),m="multipart/form-data"):(p=h,m="application/json"),l==="Core"?r.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":m}}):r.post(`/apps/${t}/integration-endpoints/installable/${l}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":m}})}}})}})}function sk(){return typeof window>"u"?!1:window!==window.parent}function ok(r,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(r,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",m),clearInterval(g),h.closed||h.close()},m=v=>{var _;if(v.origin!==s||v.source!==h||!(!((_=v.data)===null||_===void 0)&&_.access_token))return;p();const N=new URL(t),{access_token:j,is_new_user:k}=v.data;N.searchParams.set("access_token",j),k!=null&&N.searchParams.set("is_new_user",String(k)),window.location.href=N.toString()},g=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",m)}function ik(r,t,s,o){let l=null;const u=()=>{l=null};let d=!!o.token;return{hasToken(){return d},async me(){const h=l??r.get(`/apps/${s}/entities/User/me`).finally(()=>{l===h&&(l=null)});return l=h,h},async updateMe(h){return r.put(`/apps/${s}/entities/User/me`,h)},redirectToLogin(h){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const p=h?new URL(h,window.location.origin).toString():window.location.href,m=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(p)}`;window.location.href=m},loginWithProvider(h,p="/"){const m=new URL(p,window.location.origin).toString(),g=`app_id=${s}&from_url=${encodeURIComponent(m)}`;let v;h==="sso"?v=`/apps/${s}/auth/sso/login`:v=`/apps/auth${h==="google"?"":`/${h}`}/login`;const _=`${o.appBaseUrl}/api${v}?${g}`;if(sk()){const N=`${_}&popup_origin=${encodeURIComponent(window.location.origin)}`;return ok(N,m,window.location.origin)}window.location.href=_},logout(h){if(delete r.defaults.headers.common.Authorization,u(),pm(),d=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(g){console.error("Failed to remove token from localStorage:",g)}const p=h||window.location.href,m=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(p)}`;window.location.href=m}},setToken(h,p=!0){if(h&&(u(),pm(),d=!0,r.defaults.headers.common.Authorization=`Bearer ${h}`,t.defaults.headers.common.Authorization=`Bearer ${h}`,p&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",h),window.localStorage.setItem("token",h)}catch(m){console.error("Failed to save token to localStorage:",m)}},async loginViaEmailPassword(h,p,m){var g;try{const v=await r.post(`/apps/${s}/auth/login`,{email:h,password:p,...m&&{turnstile_token:m}}),{access_token:_,user:N}=v;return _&&this.setToken(_),{access_token:_,user:N}}catch(v){throw((g=v.response)===null||g===void 0?void 0:g.status)===401&&await this.logout(),v}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(h,p){return r.post(`/apps/${s}/users/invite-user`,{user_email:h,role:p})},register(h){return r.post(`/apps/${s}/auth/register`,h)},verifyOtp({email:h,otpCode:p}){return r.post(`/apps/${s}/auth/verify-otp`,{email:h,otp_code:p})},resendOtp(h){return r.post(`/apps/${s}/auth/resend-otp`,{email:h})},resetPasswordRequest(h){return r.post(`/apps/${s}/auth/reset-password-request`,{email:h})},resetPassword({resetToken:h,newPassword:p}){return r.post(`/apps/${s}/auth/reset-password`,{reset_token:h,new_password:p})},changePassword({userId:h,currentPassword:p,newPassword:m}){return r.post(`/apps/${s}/auth/change-password`,{user_id:h,current_password:p,new_password:m})}}}function ak(r,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return r.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return r.get(o)}}}const lk=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);function uk(r,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await r.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(s)}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(s)}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(s)}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(s)}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(s)}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async callApi(s,o){return Og(s,"Integration type"),ck(r,`/apps/${t}/connectors/${encodeURIComponent(s)}/call`,o)}}}function Og(r,t){if(!r||typeof r!="string")throw new Error(`${t} is required and must be a string`)}async function ck(r,t,s){var o,l,u,d,h,p,m,g,v;if(!s||typeof s!="object")throw new Error("Request is required and must be an object");Og(s.path,"Request path");const _=(o=s.method)!==null&&o!==void 0?o:"GET";if(!lk.has(_))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const j=await r.post(t,{method:_,...s.host==null?{}:{host:s.host},path:s.path,query:(l=s.query)!==null&&l!==void 0?l:{},headers:(u=s.headers)!==null&&u!==void 0?u:{},body:(d=s.body)!==null&&d!==void 0?d:null});return{success:j.success,phase:j.phase,status:(h=j.status_code)!==null&&h!==void 0?h:null,data:j.data,dataBase64:(p=j.data_base64)!==null&&p!==void 0?p:null,contentType:(m=j.content_type)!==null&&m!==void 0?m:null,headers:(g=j.headers)!==null&&g!==void 0?g:{},creditsCharged:(v=j.credits_charged)!==null&&v!==void 0?v:0}}function dk(r,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(s)}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await r.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(s)}`)}}}function qr(r={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:l=!0}=r;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&fk(u,{storageKey:t}),l){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function fk(r,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!r)return!1;try{return window.localStorage.setItem(s,r),window.localStorage.setItem("token",r),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function gm(r,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,l=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,m])=>{m!=null&&d.set(p,String(m))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(h=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?h.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?h.append(m,JSON.stringify(d[m])):h.append(m,d[m])}),p="multipart/form-data"):(h=d,p="application/json"),r.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,m=l(d.headers),g={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,p),g)}}}function vm({axios:r,getSocket:t,appId:s,serverUrl:o,token:l}){const u=`/apps/${s}/agents`,d={},h=()=>r.get(`${u}/conversations`),p=k=>r.get(`${u}/conversations/${k}`);return{getConversations:h,getConversation:p,listConversations:k=>r.get(`${u}/conversations`,{params:k}),createConversation:k=>r.post(`${u}/conversations`,k),addMessage:async(k,w)=>r.post(`${u}/conversations/v2/${k.id}/messages`,w),subscribeToConversation:(k,w)=>{const E=`/agent-conversations/${k}`,F=t(),A=p(k).then(L=>(d[k]=L,L));return F.subscribeToRoom(E,{connect:()=>{},update_model:async({data:L})=>{const W=JSON.parse(L);if(W._message){await A;const $=W._message,G=d[k];if(G){const z=G.messages||[],ie=z.findIndex(Ee=>Ee.id===$.id),ue=ie!==-1?z.map((Ee,Te)=>Te===ie?$:Ee):[...z,$];d[k]={...G,messages:ue},w==null||w(d[k])}}}})},getWhatsAppConnectURL:k=>{const w=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/whatsapp`,E=l??qr();return E?`${w}?token=${E}`:w},getTelegramConnectURL:k=>{const w=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/telegram`,E=l??qr();return E?`${w}?token=${E}`:w}}}function wm({serverUrl:r,token:t,appId:s}){return{connection:()=>{var l;return{baseURL:`${r}/api/apps/${s}/ai/openai/v1`,token:(l=t??qr())!==null&&l!==void 0?l:""}}}}function xm(r,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await r.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await r.get(s,{params:o})},async getStats(o={}){return await r.get(`${s}/stats`,{params:o})}}}function hk(r,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await r.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const wn=Object.create(null);wn.open="0";wn.close="1";wn.ping="2";wn.pong="3";wn.message="4";wn.upgrade="5";wn.noop="6";const Ta=Object.create(null);Object.keys(wn).forEach(r=>{Ta[wn[r]]=r});const Pc={type:"error",data:"parser error"},Ag=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ng=typeof ArrayBuffer=="function",Lg=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,od=({type:r,data:t},s,o)=>Ag&&t instanceof Blob?s?o(t):Em(t,o):Ng&&(t instanceof ArrayBuffer||Lg(t))?s?o(t):Em(new Blob([t]),o):o(wn[r]+(t||"")),Em=(r,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(r)};function Sm(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let Zu;function pk(r,t){if(Ag&&r.data instanceof Blob)return r.data.arrayBuffer().then(Sm).then(t);if(Ng&&(r.data instanceof ArrayBuffer||Lg(r.data)))return t(Sm(r.data));od(r,!1,s=>{Zu||(Zu=new TextEncoder),t(Zu.encode(s))})}const _m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<_m.length;r++)jo[_m.charCodeAt(r)]=r;const mk=r=>{let t=r.length*.75,s=r.length,o,l=0,u,d,h,p;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(o=0;o>4,g[l++]=(d&15)<<4|h>>2,g[l++]=(h&3)<<6|p&63;return m},yk=typeof ArrayBuffer=="function",id=(r,t)=>{if(typeof r!="string")return{type:"message",data:Fg(r,t)};const s=r.charAt(0);return s==="b"?{type:"message",data:gk(r.substring(1),t)}:Ta[s]?r.length>1?{type:Ta[s],data:r.substring(1)}:{type:Ta[s]}:Pc},gk=(r,t)=>{if(yk){const s=mk(r);return Fg(s,t)}else return{base64:!0,data:r}},Fg=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}},Dg="",vk=(r,t)=>{const s=r.length,o=new Array(s);let l=0;r.forEach((u,d)=>{od(u,!1,h=>{o[d]=h,++l===s&&t(o.join(Dg))})})},wk=(r,t)=>{const s=r.split(Dg),o=[];for(let l=0;l{const o=s.length;let l;if(o<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,o);else if(o<65536){l=new Uint8Array(3);const u=new DataView(l.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{l=new Uint8Array(9);const u=new DataView(l.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}r.data&&typeof r.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(s)})}})}let ec;function xa(r){return r.reduce((t,s)=>t+s.length,0)}function Ea(r,t){if(r[0].length===t)return r.shift();const s=new Uint8Array(t);let o=0;for(let l=0;lMath.pow(2,21)-1){h.enqueue(Pc);break}l=g*Math.pow(2,32)+m.getUint32(4),o=3}else{if(xa(s)r){h.enqueue(Pc);break}}}})}const Ig=4;function Xe(r){if(r)return Sk(r)}function Sk(r){for(var t in Xe.prototype)r[t]=Xe.prototype[t];return r}Xe.prototype.on=Xe.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};Xe.prototype.once=function(r,t){function s(){this.off(r,s),t.apply(this,arguments)}return s.fn=t,this.on(r,s),this};Xe.prototype.off=Xe.prototype.removeListener=Xe.prototype.removeAllListeners=Xe.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+r];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,l=0;lPromise.resolve().then(t):(t,s)=>s(t,0),Kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),_k="arraybuffer";function jg(r,...t){return t.reduce((s,o)=>(r.hasOwnProperty(o)&&(s[o]=r[o]),s),{})}const kk=Kt.setTimeout,bk=Kt.clearTimeout;function Qa(r,t){t.useNativeTimers?(r.setTimeoutFn=kk.bind(Kt),r.clearTimeoutFn=bk.bind(Kt)):(r.setTimeoutFn=Kt.setTimeout.bind(Kt),r.clearTimeoutFn=Kt.clearTimeout.bind(Kt))}const Ck=1.33;function Rk(r){return typeof r=="string"?Tk(r):Math.ceil((r.byteLength||r.size)*Ck)}function Tk(r){let t=0,s=0;for(let o=0,l=r.length;o=57344?s+=3:(o++,s+=4);return s}function Mg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Pk(r){let t="";for(let s in r)r.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(r[s]));return t}function Ok(r){let t={},s=r.split("&");for(let o=0,l=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};wk(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,vk(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=Mg()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let Ug=!1;try{Ug=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Lk=Ug;function Fk(){}class Dk extends Nk{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(l,u)=>{this.onError("xhr post error",l,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class vn extends Xe{constructor(t,s,o){super(),this.createRequest=t,Qa(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=jg(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&o.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var l;o.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=vn.requestsCount++,vn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Fk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete vn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}vn.requestsCount=0;vn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",km);else if(typeof addEventListener=="function"){const r="onpagehide"in Kt?"pagehide":"unload";addEventListener(r,km,!1)}}function km(){for(let r in vn.requests)vn.requests.hasOwnProperty(r)&&vn.requests[r].abort()}const Ik=(function(){const r=Bg({xdomain:!1});return r&&r.responseType!==null})();class jk extends Dk{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=Ik&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new vn(Bg,this.uri(),t)}}function Bg(r){const t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Lk))return new XMLHttpRequest}catch{}if(!t)try{return new Kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const zg=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Mk extends ad{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=zg?{}:jg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}l&&qa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=Mg()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const tc=Kt.WebSocket||Kt.MozWebSocket;class Uk extends Mk{createSocket(t,s,o){return zg?new tc(t,s,o):s?new tc(t,s):new tc(t)}doWrite(t,s){this.ws.send(s)}}class Bk extends ad{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=Ek(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),l=xk();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{l&&qa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const zk={websocket:Uk,webtransport:Bk,polling:jk},$k=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Oc(r){if(r.length>8e3)throw"URI too long";const t=r,s=r.indexOf("["),o=r.indexOf("]");s!=-1&&o!=-1&&(r=r.substring(0,s)+r.substring(s,o).replace(/:/g,";")+r.substring(o,r.length));let l=$k.exec(r||""),u={},d=14;for(;d--;)u[Wk[d]]=l[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=Vk(u,u.path),u.queryKey=Hk(u,u.query),u}function Vk(r,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function Hk(r,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,l,u){l&&(s[l]=u)}),s}const Ac=typeof addEventListener=="function"&&typeof removeEventListener=="function",Pa=[];Ac&&addEventListener("offline",()=>{Pa.forEach(r=>r())},!1);class yr extends Xe{constructor(t,s){if(super(),this.binaryType=_k,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Oc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Oc(s.host).host);Qa(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const l=o.prototype.name;this.transports.push(l),this._transportsByName[l]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ok(this.opts.query)),Ac&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Pa.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Ig,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",yr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,qa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,l){if(typeof s=="function"&&(l=s,s=void 0),typeof o=="function"&&(l=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(yr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ac&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Pa.indexOf(this._offlineEventListener);o!==-1&&Pa.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}yr.protocol=Ig;class qk extends yr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;yr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(g(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const _=new Error("probe error");_.transport=s.name,this.emitReserved("upgradeError",_)}}))};function u(){o||(o=!0,g(),s.close(),s=null)}const d=v=>{const _=new Error("probe error: "+v);_.transport=s.name,u(),this.emitReserved("upgradeError",_)};function h(){d("transport closed")}function p(){d("socket closed")}function m(v){s&&v.name!==s.name&&u()}const g=()=>{s.removeListener("open",l),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",m)};s.once("open",l),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;ozk[u]).filter(u=>!!u)),super(o?l:t,l)}};function Kk(r,t="",s){let o=r;s=s||typeof location<"u"&&location,r==null&&(r=s.protocol+"//"+s.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=s.protocol+r:r=s.host+r),/^(https?|wss?):\/\//.test(r)||(typeof s<"u"?r=s.protocol+"//"+r:r="https://"+r),o=Oc(r)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const Gk=typeof ArrayBuffer=="function",Xk=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,$g=Object.prototype.toString,Yk=typeof Blob=="function"||typeof Blob<"u"&&$g.call(Blob)==="[object BlobConstructor]",Jk=typeof File=="function"||typeof File<"u"&&$g.call(File)==="[object FileConstructor]";function ld(r){return Gk&&(r instanceof ArrayBuffer||Xk(r))||Yk&&r instanceof Blob||Jk&&r instanceof File}function Oa(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let s=0,o=r.length;s=0&&r.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const l=t.charAt(s+1);if(l!==""&&Number(l)==l){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(ud.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Ae.CONNECT:return bm(s);case Ae.DISCONNECT:return s===void 0;case Ae.CONNECT_ERROR:return typeof s=="string"||bm(s);case Ae.EVENT:case Ae.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&tb.indexOf(s[0])===-1);case Ae.ACK:case Ae.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rb{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=eb(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const sb=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function bm(r){return Object.prototype.toString.call(r)==="[object Object]"}const ob=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ud,Encoder:nb,get PacketType(){return Ae}},Symbol.toStringTag,{value:"Module"}));function ln(r,t,s){return r.on(t,s),function(){r.off(t,s)}}const ib=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wg extends Xe{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ln(t,"open",this.onopen.bind(this)),ln(t,"packet",this.onpacket.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,l,u;if(ib.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Ae.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const g=this.ids++,v=s.pop();this._registerAckCallback(g,v),d.id=g}const h=(l=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||l===void 0?void 0:l.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const l=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(l===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,l)=>{const u=(d,h)=>d?l(d):o(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...u)=>(this._queue[0],l!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(l)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ae.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ae.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ae.EVENT:case Ae.BINARY_EVENT:this.onevent(t);break;case Ae.ACK:case Ae.BINARY_ACK:this.onack(t);break;case Ae.DISCONNECT:this.ondisconnect();break;case Ae.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...l){o||(o=!0,s.packet({type:Ae.ACK,id:t,data:l}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ae.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&r.jitter<=1?r.jitter:0,this.attempts=0}Ws.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-s:r+s}return Math.min(r,this.max)|0};Ws.prototype.reset=function(){this.attempts=0};Ws.prototype.setMin=function(r){this.ms=r};Ws.prototype.setMax=function(r){this.max=r};Ws.prototype.setJitter=function(r){this.jitter=r};class Fc extends Xe{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Qa(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Ws({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const l=s.parser||ob;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Qk(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const l=ln(s,"open",function(){o.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=ln(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{l(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(l),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ln(t,"ping",this.onping.bind(this)),ln(t,"data",this.ondata.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this)),ln(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){qa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new Wg(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Lo={};function Aa(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};const s=Kk(r,t.path||"/socket.io"),o=s.source,l=s.id,u=s.path,d=Lo[l]&&u in Lo[l].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Fc(o,t):(Lo[l]||(Lo[l]=new Fc(o,t)),p=Lo[l]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign(Aa,{Manager:Fc,Socket:Wg,io:Aa,connect:Aa});const ab=250;function Cm(r,t){var s;const o=(s=r.token)!==null&&s!==void 0?s:qr(),l={app_id:r.appId,token:o};o||(l.anonymous_id=Ua());const u=Aa(r.serverUrl,{path:r.mountPath,transports:r.transports,query:l});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function lb({config:r}){let t={...r};const s={},o={},l={connect:async()=>{const E=[];Object.keys(s).forEach(F=>{const A=_(F);A.length!==0&&(m(F),A.forEach(({connect:L})=>{const W=async()=>L==null?void 0:L();E.push(W())}))}),await Promise.all(E)},update_model:async E=>{const A=_(E.room).map(L=>{var W;return(W=L.update_model)===null||W===void 0?void 0:W.call(L,E)});await Promise.all(A)},error:async E=>{console.error("error",E);const F=Object.values(s).flat().map(A=>{var L;return(L=A.error)===null||L===void 0?void 0:L.call(A,E)});await Promise.all(F)}};let u=Cm(r,l);function d(){h()}function h(){j(),u&&u.disconnect()}function p(E){d(),t={...t,...E},u=Cm(t,l)}function m(E){u.emit("join",E)}function g(E){u.emit("leave",E)}async function v(E,F){var A;const L=JSON.stringify(F);return(A=l.update_model)===null||A===void 0?void 0:A.call(l,{room:E,data:L})}function _(E){var F;return(F=s[E])!==null&&F!==void 0?F:[]}function N(E){const F=o[E];F&&(clearTimeout(F),delete o[E])}function j(){Object.keys(o).forEach(E=>{var F,A;clearTimeout(o[E]),delete o[E],((A=(F=s[E])===null||F===void 0?void 0:F.length)!==null&&A!==void 0?A:0)===0&&delete s[E]})}function k(E){N(E),o[E]=setTimeout(()=>{var F,A;delete o[E],!(((A=(F=s[E])===null||F===void 0?void 0:F.length)!==null&&A!==void 0?A:0)>0)&&(g(E),delete s[E])},ab)}return{socket:u,subscribeToRoom:(E,F)=>{s[E]?N(E):(m(E),s[E]=[]),s[E].push(F);let A=!1;return()=>{var L,W;A||(A=!0,s[E]=(W=(L=s[E])===null||L===void 0?void 0:L.filter($=>$!==F))!==null&&W!==void 0?W:[],s[E].length===0&&k(E))}},updateConfig:p,updateModel:v,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var Vg=class extends Event{constructor(t,s){super("error",s);Fe(this,"message");Fe(this,"error");this.message=t.message,this.error=t}},Hg=class extends Event{constructor(t=1e3,s="",o){super("close",o);Fe(this,"code");Fe(this,"reason");Fe(this,"wasClean",!0);this.code=t,this.reason=s}},nc={Event,ErrorEvent:Vg,CloseEvent:Hg};function ub(r,t){if(!r)throw new Error(t)}function cb(r){return new r.constructor(r.type,r)}function db(r){return"data"in r?new MessageEvent(r.type,r):"code"in r||"reason"in r?new Hg(r.code||1999,r.reason||"unknown reason",r):"error"in r?new Vg(r.error,r):new Event(r.type,r)}var Bm,fb=typeof process<"u"&&typeof((Bm=process.versions)==null?void 0:Bm.node)<"u"&&typeof document>"u",Sa=fb?db:cb,Nr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Rm=!1,hb=class Lr extends EventTarget{constructor(s,o,l={}){super();Fe(this,"_ws");Fe(this,"_retryCount",-1);Fe(this,"_uptimeTimeout");Fe(this,"_connectTimeout");Fe(this,"_shouldReconnect",!0);Fe(this,"_connectLock",!1);Fe(this,"_binaryType","blob");Fe(this,"_closeCalled",!1);Fe(this,"_messageQueue",[]);Fe(this,"_url");Fe(this,"_protocols");Fe(this,"_options");Fe(this,"onclose",null);Fe(this,"onerror",null);Fe(this,"onmessage",null);Fe(this,"onopen",null);Fe(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=Nr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),ub(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(l=>{var u;return(u=this._ws)==null?void 0:u.send(l)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Sa(s))});Fe(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Sa(s))});Fe(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Sa(s)),this._connect()});Fe(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Sa(s))});this._url=s,this._protocols=o,this._options=l,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Lr.CONNECTING}get OPEN(){return Lr.OPEN}get CLOSING(){return Lr.CLOSING}get CLOSED(){return Lr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,l)=>(typeof l=="string"?o+=l.length:l instanceof Blob?o+=l.size:o+=l.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Lr.CLOSED:Lr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=Nr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Nr.reconnectionDelayGrowFactor,minReconnectionDelay:o=Nr.minReconnectionDelay,maxReconnectionDelay:l=Nr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>l&&(u=l)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Nr.maxRetries,connectionTimeout:o=Nr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([l,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Rm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Rm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:l,protocols:u}),this._ws=u?new d(l,u):new d(l),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(l=>{this._connectLock=!1,this._handleError(new nc.ErrorEvent(Error(l.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new nc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new nc.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var pb=r=>r[1]!==null&&r[1]!==void 0;function mb(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let r=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return r>0?(o=(r+o)%16|0,r=Math.floor(r/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function qg(r,t,s={}){const{host:o,path:l,protocol:u,room:d,party:h,query:p}=r;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),l&&l.startsWith("/"))throw new Error("path must not start with a slash");const g=h??"main",v=l?`/${l}`:"",_=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),N=`${_}://${m}/${h?`parties/${h}`:"party"}/${d}${v}`,j=(w={})=>`${N}?${new URLSearchParams([...Object.entries(s),...Object.entries(w).filter(pb)])}`,k=typeof p=="function"?async()=>j(await p()):j(p);return{host:m,path:v,room:d,name:g,protocol:_,partyUrl:N,urlProvider:k}}var yb=class extends hb{constructor(t){const s=Tm(t);super(s.urlProvider,s.protocols,s.socketOptions);Fe(this,"_pk");Fe(this,"_pkurl");Fe(this,"name");Fe(this,"room");Fe(this,"host");Fe(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=Tm({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:l,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=o,this.name=l,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=qg(t,"http"),l=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(l,s)}};function Tm(r){const{id:t,host:s,path:o,party:l,room:u,protocol:d,query:h,protocols:p,...m}=r,g=t||mb(),v=qg(r,"ws",{_pk:g});return{_pk:g,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:p,socketOptions:m,urlProvider:v.urlProvider}}const gb=1e3,vb=3e3;class wb{constructor(t,s,o,l,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=l==null?void 0:l.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new yb({host:o.host,party:t,room:s,id:this.id,query:()=>{const g=o.getAuthToken();return{app_id:o.appId,handler:t,...g?{token:g}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",g=>{m();let v;try{v=JSON.parse(g.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const N of this.listeners)N(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>vb){m(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},gb)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function xb(r,t,s,o){let l=null;return{connect(u){if(l)return l;const d=new wb(r,t,s,u,()=>{o.delete(d),l===d&&(l=null)});return l=d,o.add(d),d}}}function Eb(r,t){return r&&!r.startsWith("/")?r:t??r}function Sb(r){const t=new Set;return{module:new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"))return u=>xb(l,u,r,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function _b(r){var t,s,o;const{serverUrl:l="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:g,functionsVersion:v,headers:_}=r,N=typeof m=="string"?m:"",j={serverUrl:l,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let k=null;const w=()=>(k||(k=lb({config:j})),k),E={..._,"X-App-Id":String(u)},F=v?{...E,"Base44-Functions-Version":v}:E,A=Io({baseURL:`${l}/api`,headers:E,token:d,onError:g==null?void 0:g.onError}),L=Io({baseURL:`${l}/api`,headers:F,token:d,interceptResponses:!1,onError:g==null?void 0:g.onError}),W={...E,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=Io({baseURL:`${l}/api`,headers:W,token:h,onError:g==null?void 0:g.onError}),G=Io({baseURL:`${l}/api`,headers:F,token:h,interceptResponses:!1}),z=ik(A,L,u,{appBaseUrl:N,token:d});if(typeof window<"u"){const xe=d||qr();xe&&z.setToken(xe)}const ie=Sb({appId:u,host:Eb(l,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:v,getAuthToken:()=>d||qr()}),ue={entities:mm({axios:A,appId:u,getSocket:w}),integrations:ym(A,u),connectors:dk(A,u),auth:z,functions:gm(L,u,{getAuthHeaders:()=>{const xe={},J=d||qr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=L.defaults)===null||s===void 0?void 0:s.baseURL}),agents:vm({axios:A,getSocket:w,appId:u,serverUrl:l,token:d}),aiGateway:wm({serverUrl:l,token:d,appId:u}),appLogs:xm(A,u),users:hk(A,u),analytics:q_({axiosClient:A,serverUrl:l,appId:u,userAuthModule:z}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),k&&k.disconnect()}},Ee={entities:mm({axios:$,appId:u,getSocket:w}),integrations:ym($,u),sso:ak($,u),connectors:uk($,u),functions:gm(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:vm({axios:$,getSocket:w,appId:u,serverUrl:l,token:d}),aiGateway:wm({serverUrl:l,token:h,appId:u}),appLogs:xm($,u),cleanup:()=>{k&&k.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),k&&k.updateConfig({token:xe}),j.token=xe},getConfig(){return{serverUrl:l,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Ee}}}const Qg=typeof window>"u",kb=Qg?{localStorage:new Map}:window,zo=kb.localStorage,bb=r=>r.replace(/([A-Z])/g,"_$1").toLowerCase(),ks=(r,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(Qg)return t;const o=`base44_${bb(r)}`,l=new URLSearchParams(window.location.search),u=l.get(r);if(s){l.delete(r);const h=`${window.location.pathname}${l.toString()?`?${l.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return zo.setItem(o,u),u;if(t)return zo.setItem(o,t),t;const d=zo.getItem(o);return d||null},Cb=()=>(ks("clear_access_token")==="true"&&(zo.removeItem("base44_access_token"),zo.removeItem("token")),{appId:ks("app_id",{defaultValue:"6a92bcbdb0a039d7d4a0ba4f"}),token:ks("access_token",{removeFromUrl:!0}),fromUrl:ks("from_url",{defaultValue:window.location.href}),functionsVersion:ks("functions_version",{defaultValue:"prod"}),appBaseUrl:ks("app_base_url",{defaultValue:void 0})}),Mo={...Cb()},{appId:Rb,token:Tb,functionsVersion:Pb,appBaseUrl:Ob}=Mo,Uo=_b({appId:Rb,token:Tb,functionsVersion:Pb,serverUrl:"",requiresAuth:!1,appBaseUrl:Ob});function Ab({}){var l;const t=Yc().pathname.substring(1),{data:s,isFetched:o}=VE({queryKey:["user"],queryFn:async()=>{try{return{user:await Uo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return S.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:S.jsx("div",{className:"max-w-md w-full",children:S.jsxs("div",{className:"text-center space-y-6",children:[S.jsxs("div",{className:"space-y-2",children:[S.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),S.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),S.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",S.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((l=s.user)==null?void 0:l.role)==="admin"&&S.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:S.jsxs("div",{className:"flex items-start space-x-3",children:[S.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:S.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),S.jsxs("div",{className:"text-left space-y-1",children:[S.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),S.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),S.jsx("div",{className:"pt-6",children:S.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[S.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Kg=R.createContext(),Nb=({children:r})=>{const[t,s]=R.useState(null),[o,l]=R.useState(!1),[u,d]=R.useState(!0),[h,p]=R.useState(!0),[m,g]=R.useState(null),[v,_]=R.useState(!1),[N,j]=R.useState(null);R.useEffect(()=>{k()},[]);const k=async()=>{var A,L;try{p(!0),g(null);const W=Io({baseURL:"/api/apps/public",headers:{"X-App-Id":Mo.appId},token:Mo.token,interceptResponses:!0});try{const $=await W.get(`/prod/public-settings/by-id/${Mo.appId}`);j($),Mo.token?await w():(d(!1),l(!1),_(!0)),p(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((L=(A=$.data)==null?void 0:A.extra_data)!=null&&L.reason)){const G=$.data.extra_data.reason;g(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else g({type:"unknown",message:$.message||"Failed to load app"});p(!1),d(!1)}}catch(W){console.error("Unexpected error:",W),g({type:"unknown",message:W.message||"An unexpected error occurred"}),p(!1),d(!1)}},w=async()=>{try{d(!0);const A=await Uo.auth.me();s(A),l(!0),d(!1),_(!0)}catch(A){console.error("User auth check failed:",A),d(!1),l(!1),_(!0),(A.status===401||A.status===403)&&g({type:"auth_required",message:"Authentication required"})}},E=(A=!0)=>{s(null),l(!1),A?Uo.auth.logout(window.location.href):Uo.auth.logout()},F=()=>{Uo.auth.redirectToLogin(window.location.href)};return S.jsx(Kg.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:h,authError:m,appPublicSettings:N,authChecked:v,logout:E,navigateToLogin:F,checkUserAuth:w,checkAppState:k},children:r})},Lb=()=>{const r=R.useContext(Kg);if(!r)throw new Error("useAuth must be used within an AuthProvider");return r},Fb=()=>S.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:S.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:S.jsxs("div",{className:"text-center",children:[S.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:S.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),S.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),S.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),S.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[S.jsx("p",{children:"If you believe this is an error, you can:"}),S.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[S.jsx("li",{children:"Verify you are logged in with the correct account"}),S.jsx("li",{children:"Contact the app administrator for access"}),S.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),Db=r=>{const t=r.slice(1);try{return decodeURIComponent(t)}catch{return t}};function Ib(){const{pathname:r,hash:t}=Yc(),s=yS();return R.useEffect(()=>{if(s!=="POP"){if(t){const o=Db(t),l=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(l)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[r,t,s]),null}const jb="https://media.base44.com/images/public/6a92bcbdb0a039d7d4a0ba4f/dcbd46dd4_generated_ea0aaaaf.png";function Mb(){return S.jsxs("section",{className:"relative w-full overflow-hidden",style:{minHeight:"700px",height:"100vh"},children:[S.jsxs("div",{className:"absolute inset-0",children:[S.jsx("img",{src:jb,alt:"","aria-hidden":"true",className:"w-full h-full object-cover animate-ken-burns"}),S.jsx("div",{className:"absolute inset-0",style:{background:"rgba(26, 31, 44, 0.60)"}})]}),S.jsx("div",{className:"relative h-full flex items-center",children:S.jsx("div",{className:"mx-auto w-full",style:{maxWidth:"1440px",padding:"0 64px"},children:S.jsxs("div",{style:{maxWidth:"720px"},children:[S.jsx("span",{className:"caption",style:{color:"#FFFFFF",borderLeft:"3px solid #8D0034",paddingLeft:"16px"},children:"Our Businesses / Hospitality"}),S.jsxs("h1",{className:"font-display",style:{color:"#FFFFFF",marginTop:"24px",fontSize:"clamp(40px, 5vw, 56px)",lineHeight:"64px",letterSpacing:"-0.015em",fontWeight:500},children:["Architecting World-Class",S.jsx("br",{}),"Hospitality Assets."]}),S.jsx("p",{className:"font-body",style:{color:"#E0E0E0",marginTop:"24px",fontSize:"18px",lineHeight:"28px",maxWidth:"640px"},children:"Alrazah Holding executes disciplined investments in premium hospitality real estate and operations. We partner with global industry leaders to develop, manage, and optimize high-yield assets that advance Qatar's position as a premier global destination."}),S.jsx("a",{href:"#mandate",className:"inline-block transition-all",style:{marginTop:"40px",background:"#8D0034",color:"#FFFFFF",padding:"16px 32px",fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"15px",textDecoration:"none",border:"1px solid #8D0034"},onMouseEnter:r=>{r.currentTarget.style.background="#5A0021",r.currentTarget.style.borderColor="#5A0021"},onMouseLeave:r=>{r.currentTarget.style.background="#8D0034",r.currentTarget.style.borderColor="#8D0034"},children:"Explore Our Verticals"})]})})}),S.jsxs("div",{className:"hidden md:flex absolute right-8 top-1/2 -translate-y-1/2 flex-col items-center gap-3",style:{color:"rgba(255,255,255,0.5)"},"aria-hidden":"true",children:[S.jsx("span",{className:"caption",style:{color:"rgba(255,255,255,0.6)",writingMode:"vertical-rl"},children:"Sector 01 / 04"}),S.jsx("div",{style:{width:"1px",height:"80px",background:"rgba(255,255,255,0.3)"}}),S.jsx("div",{style:{width:"8px",height:"8px",background:"#8D0034"}})]})]})}const Ub=[{label:"Portfolio Value",value:"QAR 4.1 Billion+"},{label:"Managed Keys",value:"2,800+ Rooms"},{label:"Global Operators",value:"4 Strategic Partners"},{label:"Avg. Occupancy",value:"82% (Trailing 12 Mo)"}];function Bb(){return S.jsx("section",{id:"mandate",className:"reveal",style:{background:"#F5F5F0",padding:"128px 0"},children:S.jsxs("div",{className:"mx-auto",style:{maxWidth:"1440px",padding:"0 64px"},children:[S.jsxs("div",{className:"grid grid-cols-12",style:{gap:"24px"},children:[S.jsx("div",{className:"col-span-12 md:col-span-5",children:S.jsxs("div",{className:"md:sticky md:top-16",children:[S.jsx("h2",{className:"font-display reveal",style:{color:"#111111",fontSize:"clamp(32px, 4vw, 40px)",lineHeight:"48px",letterSpacing:"-0.01em",fontWeight:500},children:"Strategic Mandate"}),S.jsx("div",{className:"reveal",style:{width:"48px",height:"3px",background:"#8D0034",marginTop:"24px"}})]})}),S.jsxs("div",{className:"col-span-12 md:col-span-7",children:[S.jsx("p",{className:"font-body reveal",style:{color:"#111111",fontSize:"18px",lineHeight:"28px",marginBottom:"24px"},children:"Our hospitality portfolio is engineered for long-term capital appreciation and resilient cash-flow generation. We approach hospitality not as a transient service, but as a core institutional asset class."}),S.jsx("p",{className:"font-body reveal",style:{color:"#4A4A4A",fontSize:"16px",lineHeight:"26px"},children:"Aligned with the Qatar National Tourism Sector Strategy 2030, our investments focus on high-barrier-to-entry segments, including luxury accommodations, large-scale MICE (Meetings, Incentives, Conferences, and Exhibitions) infrastructure, and branded residences. We leverage rigorous asset management protocols to maximize RevPAR (Revenue Per Available Room) and ensure sustained market leadership."})]})]}),S.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 reveal",style:{marginTop:"64px",borderTop:"1px solid #D4D4D4",borderLeft:"1px solid #D4D4D4"},children:Ub.map(r=>S.jsxs("div",{className:"tabular-nums",style:{padding:"32px",borderRight:"1px solid #D4D4D4",borderBottom:"1px solid #D4D4D4"},children:[S.jsx("span",{className:"caption",style:{color:"#8D0034"},children:r.label}),S.jsx("h3",{className:"font-display",style:{color:"#111111",marginTop:"8px",fontSize:"24px",lineHeight:"32px",fontWeight:500},children:r.value})]},r.label))})]})})}const zb=[{title:"Institutional Asset Ownership",desc:"Direct equity ownership and development of premium hotel and branded residence assets in high-growth corridors of Doha and key regional markets, ensuring long-term capital appreciation.",icon:S.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[S.jsx("rect",{x:"6",y:"10",width:"12",height:"24",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("rect",{x:"22",y:"6",width:"12",height:"28",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"10",y1:"16",x2:"14",y2:"16",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"10",y1:"22",x2:"14",y2:"22",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"10",y1:"28",x2:"14",y2:"28",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"26",y1:"12",x2:"30",y2:"12",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"26",y1:"18",x2:"30",y2:"18",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"26",y1:"24",x2:"30",y2:"24",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"26",y1:"30",x2:"30",y2:"30",stroke:"#6B5B4F",strokeWidth:"1"})]})},{title:"Strategic Brand Partnerships",desc:"Structuring and negotiating long-term management and franchise agreements with tier-one global hospitality operators (e.g., Marriott, Accor, IHG) to ensure world-class operational standards.",icon:S.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[S.jsx("circle",{cx:"13",cy:"20",r:"7",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("circle",{cx:"27",cy:"20",r:"7",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("path",{d:"M20 20 L20 20",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"18",y1:"20",x2:"22",y2:"20",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"13",y1:"13",x2:"13",y2:"16",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"27",y1:"13",x2:"27",y2:"16",stroke:"#6B5B4F",strokeWidth:"1"})]})},{title:"MICE Infrastructure",desc:"Development and management of large-scale convention, exhibition, and corporate retreat facilities, capturing the high-margin, non-leisure segment of the tourism market.",icon:S.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[S.jsx("rect",{x:"6",y:"10",width:"28",height:"22",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"6",y1:"16",x2:"34",y2:"16",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"13",y1:"22",x2:"27",y2:"22",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"13",y1:"28",x2:"27",y2:"28",stroke:"#6B5B4F",strokeWidth:"1"}),S.jsx("line",{x1:"20",y1:"16",x2:"20",y2:"32",stroke:"#6B5B4F",strokeWidth:"1"})]})}];function $b(){return S.jsx("section",{className:"reveal",style:{background:"#FFFFFF",padding:"128px 0"},children:S.jsxs("div",{className:"mx-auto",style:{maxWidth:"1440px",padding:"0 64px"},children:[S.jsx("h2",{className:"font-display reveal",style:{color:"#111111",marginBottom:"64px",fontSize:"clamp(32px, 4vw, 40px)",lineHeight:"48px",letterSpacing:"-0.01em",fontWeight:500},children:"Core Investment Verticals"}),S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3",style:{gap:"24px"},children:zb.map((r,t)=>S.jsxs("div",{"data-stagger":t,className:"reveal transition-all",style:{border:"1px solid #D4D4D4",padding:"32px",background:"#FFFFFF",transition:"border-color 200ms ease-in-out, background-color 200ms ease-in-out"},onMouseEnter:s=>{s.currentTarget.style.borderColor="#8D0034",s.currentTarget.style.background="#FDF2F5"},onMouseLeave:s=>{s.currentTarget.style.borderColor="#D4D4D4",s.currentTarget.style.background="#FFFFFF"},children:[S.jsx("div",{style:{transition:"transform 200ms ease-in-out"},children:r.icon}),S.jsx("h3",{className:"font-body",style:{marginTop:"24px",marginBottom:"16px",color:"#111111",fontSize:"24px",lineHeight:"32px",fontWeight:600},children:r.title}),S.jsx("p",{className:"font-body",style:{color:"#4A4A4A",fontSize:"16px",lineHeight:"26px"},children:r.desc})]},r.title))})]})})}const Wb=[{title:"CAPEX & FF&E Optimization",desc:"Strategic planning and oversight of capital expenditure and Furniture, Fixtures, and Equipment (FF&E) reserves to maintain asset quality and brand standards without overcapitalization."},{title:"Revenue Management Auditing",desc:"Continuous analysis of pricing strategies, channel mix, and corporate contracting to ensure maximum RevPAR and GOPPAR (Gross Operating Profit Per Available Room)."},{title:"Operator Performance Benchmarking",desc:"Quarterly performance reviews against competitive comp sets, ensuring management agreements deliver tangible value and align with Alrazah's financial targets."}];function Vb(){return S.jsxs("section",{className:"reveal relative overflow-hidden",style:{background:"#1A1F2C",padding:"128px 0"},children:[S.jsxs("svg",{className:"absolute inset-0 w-full h-full","aria-hidden":"true",style:{opacity:.06},children:[S.jsx("defs",{children:S.jsx("pattern",{id:"grid",width:"40",height:"40",patternUnits:"userSpaceOnUse",children:S.jsx("path",{d:"M 40 0 L 0 0 0 40",fill:"none",stroke:"#8D0034",strokeWidth:"1"})})}),S.jsx("rect",{width:"100%",height:"100%",fill:"url(#grid)"})]}),S.jsx("div",{className:"relative mx-auto",style:{maxWidth:"1440px",padding:"0 64px"},children:S.jsxs("div",{className:"grid grid-cols-12",style:{gap:"24px"},children:[S.jsxs("div",{className:"col-span-12 md:col-span-5",children:[S.jsx("span",{className:"caption reveal",style:{color:"#8D0034"},children:"Asset Management"}),S.jsx("h2",{className:"font-display reveal",style:{color:"#FFFFFF",marginTop:"24px",marginBottom:"24px",fontSize:"clamp(32px, 4vw, 40px)",lineHeight:"48px",letterSpacing:"-0.01em",fontWeight:500},children:"Active Oversight. Optimized Yield."}),S.jsx("p",{className:"font-body reveal",style:{color:"#E0E0E0",fontSize:"18px",lineHeight:"28px"},children:"Ownership is only the foundation. Alrazah employs a rigorous, data-driven asset management framework to actively monitor, challenge, and optimize the performance of our hospitality partners."})]}),S.jsx("div",{className:"col-span-12 md:col-span-7",children:Wb.map((r,t)=>S.jsxs("div",{"data-stagger":t,className:"reveal",style:{border:"1px solid #333B4D",padding:"24px",marginBottom:"16px"},children:[S.jsx("h3",{className:"font-body",style:{color:"#FFFFFF",fontSize:"18px",marginBottom:"8px",fontWeight:600},children:r.title}),S.jsx("p",{className:"font-body",style:{color:"#A0AABF",fontSize:"16px",lineHeight:"26px"},children:r.desc})]},r.title))})]})})]})}const Pm=[{asset:"Doha Bay Luxury Hotel & Residences",segment:"5-Star / Branded Residences",status:"Operational",role:"Majority Owner & Developer",metric:"320 Keys / 85% Occupancy"},{asset:"Al-Wakra Convention & Exhibition Hub",segment:"MICE Infrastructure",status:"Under Development",role:"Joint Venture Lead",metric:"15,000 sqm Event Space"},{asset:"Lusail Premium Boutique Collection",segment:"Luxury Leisure",status:"Operational",role:"Equity Partner",metric:"120 Keys / Premium ADR"},{asset:"Regional Hospitality Management SPV",segment:"Asset Management",status:"Operational",role:"Sole Proprietor",metric:"Manages 4 Global Brands"}],Hb=["Asset / Project","Segment","Status","Alrazah Role","Key Metric"];function qb(){return S.jsx("section",{className:"reveal",style:{background:"#EBE7E0",padding:"128px 0"},children:S.jsxs("div",{className:"mx-auto",style:{maxWidth:"1440px",padding:"0 64px"},children:[S.jsx("h2",{className:"font-display reveal",style:{color:"#111111",marginBottom:"48px",fontSize:"clamp(32px, 4vw, 40px)",lineHeight:"48px",letterSpacing:"-0.01em",fontWeight:500},children:"Selected Portfolio Assets & Developments"}),S.jsx("div",{className:"reveal",style:{background:"#FFFFFF",border:"1px solid #D4D4D4",overflowX:"auto"},children:S.jsxs("table",{className:"w-full tabular-nums",style:{borderCollapse:"collapse",minWidth:"760px"},children:[S.jsx("thead",{children:S.jsx("tr",{style:{background:"#F5F5F0",borderBottom:"2px solid #8D0034"},children:Hb.map(r=>S.jsx("th",{className:"caption",style:{color:"#4A4A4A",textAlign:"left",padding:"20px 24px",fontWeight:500},children:r},r))})}),S.jsx("tbody",{children:Pm.map((r,t)=>S.jsxs("tr",{className:"transition-all",style:{borderBottom:t===Pm.length-1?"none":"1px solid #EAEAEA",transition:"background 150ms ease-in-out"},onMouseEnter:s=>s.currentTarget.style.background="#FDF2F5",onMouseLeave:s=>s.currentTarget.style.background="transparent",children:[S.jsx("td",{style:{padding:"20px 24px",color:"#111111",fontWeight:500},children:r.asset}),S.jsx("td",{style:{padding:"20px 24px",color:"#4A4A4A"},children:r.segment}),S.jsx("td",{style:{padding:"20px 24px"},children:S.jsxs("span",{className:"inline-flex items-center gap-2",style:{color:"#111111"},children:[S.jsx("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:r.status==="Operational"?"#8D0034":"#6B5B4F",display:"inline-block"}}),r.status]})}),S.jsx("td",{style:{padding:"20px 24px",color:"#4A4A4A"},children:r.role}),S.jsx("td",{style:{padding:"20px 24px",color:"#111111"},children:r.metric})]},r.asset))})]})})]})})}const Qb=[{title:"Energy & Water Efficiency",desc:"Mandating smart building management systems (BMS), LED retrofitting, and advanced water recycling to reduce operational carbon and water footprints by targeted annual percentages."},{title:"Qatari Cultural Integration",desc:"Ensuring architectural design, interior procurement, and culinary offerings authentically reflect Qatari heritage, supporting local artisans and the national creative economy."},{title:"Human Capital Development",desc:"Partnering with operators to implement robust Qatarization programs, ensuring meaningful career pathways and leadership development for Qatari nationals within the hospitality sector."}];function Kb(){return S.jsx("section",{className:"reveal",style:{background:"#EAEAEA",padding:"128px 0"},children:S.jsx("div",{className:"mx-auto",style:{maxWidth:"1440px",padding:"0 64px"},children:S.jsxs("div",{className:"grid grid-cols-12",style:{gap:"24px"},children:[S.jsxs("div",{className:"col-span-12 md:col-span-6",children:[S.jsx("span",{className:"caption reveal",style:{color:"#8D0034"},children:"ESG & Local Impact"}),S.jsx("h2",{className:"font-display reveal",style:{color:"#111111",marginTop:"24px",marginBottom:"24px",fontSize:"clamp(32px, 4vw, 40px)",lineHeight:"48px",letterSpacing:"-0.01em",fontWeight:500},children:"Responsible Hospitality Development."}),S.jsx("p",{className:"font-body reveal",style:{color:"#4A4A4A",fontSize:"18px",lineHeight:"28px",marginBottom:"24px"},children:"Modern hospitality must balance commercial success with environmental stewardship and cultural authenticity. Alrazah mandates rigorous ESG standards across all managed properties."})]}),S.jsxs("div",{className:"col-span-12 md:col-span-6",children:[Qb.map((r,t)=>S.jsxs("div",{"data-stagger":t,className:"reveal",style:{borderTop:"1px solid #D4D4D4",padding:"24px 0"},children:[S.jsx("h3",{className:"font-body",style:{color:"#111111",fontSize:"18px",marginBottom:"8px",fontWeight:600},children:r.title}),S.jsx("p",{className:"font-body",style:{color:"#4A4A4A",fontSize:"16px",lineHeight:"26px"},children:r.desc})]},r.title)),S.jsx("div",{style:{borderTop:"1px solid #D4D4D4"}})]})]})})})}function Gb(){return S.jsx("section",{className:"reveal",style:{background:"#8D0034",padding:"128px 0"},children:S.jsxs("div",{className:"mx-auto text-center",style:{maxWidth:"800px",padding:"0 64px"},children:[S.jsx("span",{className:"caption reveal",style:{color:"rgba(255,255,255,0.7)"},children:"Investor Relations"}),S.jsx("h2",{className:"font-display reveal",style:{color:"#FFFFFF",marginTop:"24px",marginBottom:"24px",fontSize:"clamp(32px, 4vw, 40px)",lineHeight:"48px",letterSpacing:"-0.01em",fontWeight:500},children:"Engage with our Hospitality Investment Division."}),S.jsx("p",{className:"font-body reveal",style:{color:"rgba(255,255,255,0.85)",fontSize:"18px",lineHeight:"28px",marginBottom:"48px"},children:"For detailed information regarding our hospitality portfolio, development pipeline, or strategic partnership opportunities, please contact our Investor Relations division."}),S.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-6 reveal",children:[S.jsx("a",{href:"#",className:"inline-block transition-all",style:{background:"#FFFFFF",color:"#8D0034",padding:"18px 36px",fontFamily:"Inter, sans-serif",fontWeight:600,fontSize:"15px",textDecoration:"none",border:"1px solid #FFFFFF"},onMouseEnter:r=>{r.currentTarget.style.background="#1A1F2C",r.currentTarget.style.color="#FFFFFF",r.currentTarget.style.borderColor="#1A1F2C"},onMouseLeave:r=>{r.currentTarget.style.background="#FFFFFF",r.currentTarget.style.color="#8D0034",r.currentTarget.style.borderColor="#FFFFFF"},children:"Contact Investor Relations"}),S.jsx("a",{href:"#",className:"inline-block transition-all",style:{background:"transparent",color:"#FFFFFF",padding:"18px 36px",fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"15px",textDecoration:"none",border:"1px solid rgba(255,255,255,0.4)"},onMouseEnter:r=>{r.currentTarget.style.borderColor="#FFFFFF",r.currentTarget.style.background="rgba(255,255,255,0.1)"},onMouseLeave:r=>{r.currentTarget.style.borderColor="rgba(255,255,255,0.4)",r.currentTarget.style.background="transparent"},children:"Download Sector Overview (PDF)"})]})]})})}function Xb(r={}){const t=R.useRef(null);return R.useEffect(()=>{const s=t.current;if(!s)return;const o=s.querySelectorAll(".reveal");if(!o.length)return;const l=new IntersectionObserver(u=>{u.forEach((d,h)=>{if(d.isIntersecting){const p=d.target,m=p.dataset.stagger?parseInt(p.dataset.stagger,10)*100:h*100;setTimeout(()=>p.classList.add("is-visible"),m),l.unobserve(p)}})},{threshold:.15,rootMargin:"0px 0px -10% 0px",...r});return o.forEach(u=>l.observe(u)),()=>l.disconnect()},[]),t}function Yb(){const r=Xb();return S.jsxs("div",{ref:r,className:"w-full",children:[S.jsx(Mb,{}),S.jsx(Bb,{}),S.jsx($b,{}),S.jsx(Vb,{}),S.jsx(qb,{}),S.jsx(Kb,{}),S.jsx(Gb,{})]})}const Jb=()=>{const{isLoadingAuth:r,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=Lb();if(t||r)return S.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:S.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return S.jsx(Fb,{});if(s.type==="auth_required")return o(),null}return S.jsxs(AS,{children:[S.jsx(_c,{path:"/our-businesses/hospitality",element:S.jsx(Yb,{})}),S.jsx(_c,{path:"*",element:S.jsx(Ab,{})})]})};function Zb(){return S.jsx(Nb,{children:S.jsxs(NE,{client:HE,children:[S.jsxs(FS,{children:[S.jsx(Ib,{}),S.jsx(Jb,{})]}),S.jsx(iE,{})]})})}n0.createRoot(document.getElementById("root")).render(S.jsx(Zb,{}));